[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Comparing HD to dpkg



On Sat, 19 Apr 1997, Philippe Troin wrote:

> On Sat, 19 Apr 1997 14:35:15 MDT Jason Ish (jbi130@mail.usask.ca) 
> wrote:
> 
> > This may be possible but I'm still getting a grasp on all the unix
> > utils. I would like dpkg to make a master list of everyfile that
> > it has installed, then have linux make a list of every file on the
> > system (excluding /usr/local and /home) and then matching the 2
> > lists and give me the output of files that are not in both lists so
> > I can check them out and clean my system of wasted disk space.
> 
> $ find / | sort > /tmp/on-disk
> $ cat /var/lib/dpkg/info/*.list | sort > /tmp/dpkg
> $ diff /tmp/{on-disk,dpkg}
> 
> Or a zsh one-liner:
> $ diff <(find / | sort) <(cat /var/lib/dpkg/info/*.list | sort)

'uniq' seems more appropriate for this task than diff. With '-u' it will
list only those lines which are only listed once.

(find / ; cat /var/lib/dpkg/info/*.list) | sort | uniq -u

craig

PS: Jason, start reading the man pages and info documents for shellutils,
textutils, and fileutils.  many of the really useful basic unix tools are
documented there.  see also /usr/doc/ directories for same.  enjoy!

If you haven't already installed it, install the dwww package. it allows
you to use a web browser like netscape or lynx to browse all system
documentation, including man pages, info pages, and the /usr/doc
subdirectories.  dwww really is the best thing since sliced bread (or
debian...whichever tastes better to you :-).  You will also need to
install a web server like apache, and the info2www and man2html packages.



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: