Robert P. J. Day <[email protected]> wrote:
>  for instance, if a given shared library hasn't been linked in weeks
> or months, that's something to look at.  if none of the binary
> executables in a package have been executed in that long, another
> package to examine, that sort of thing.

You could possibly do something with this, which checks each installed
package for files that have been accessed in the last six months. Please
note, however, that it cannot work if you mount your relevant filesystems
with noatime!

    for P in $(dpkg -l '*' | awk '/^i/{print $2}')
    do
        echo -n "Checking $P: " >&2
        U=$(
            for F in $(dpkg -L "$P")
            do
                test -f "$F" && find "$F" -atime +180
            done 2>/dev/null
        )
        test -n "$U" && echo "in use" >&2 || echo "MAYBE NOT USED RECENTLY" >&2
    done

Chris


-- 
To UNSUBSCRIBE, email to [email protected] 
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to