Reinstalling deleted directories.

Frank Hahn fhahn at yahoo.com
Wed Apr 27 19:12:46 UTC 2005


--- James Wilkinson <ubuntu at westexe.demon.co.uk>
wrote:


> Well, you can apt-get install debsums, which will
> list all the files
> from a package and whether they're OK or not. That
> only works if the
> sums for the package are available: not all packages
> have md5sums.
> 
> (Note that it isn't prelink-aware: *if* you've
> installed and run
> prelink, then the signatures of executables will
> have changed).
> 
> To get what you want, you're going to have to do
> some shell scripting.
> The command
> dpkg-query -W --showformat='${Package}\n'
> will get a list of each package that's installed.
> This command:
> for i in $(dpkg-query -W
> --showformat='${Package}\n') ; do debsums $i ; done
> will get you a *long* list of each file on the
> machine (that's been
> installed through .deb packages), and its status.
> 
> You probably want to ignore a lot of the output
> lines: try something
> like:
> for i in $(dpkg-query -W
> --showformat='${Package}\n') ; do debsums $i ; done
> | grep -v ' OK$' 
> 
> Then the command
> dpkg-query -S $FILENAME
> will show you which package owns $FILENAME.
> 
> I must admit to not being too familiar with dpkg:
> I've been working on
> RPM based distros. So there may be an easier way of
> doing some of this.
> The RPM equivalent is the command
> rpm -Va
> which seems a lot simpler to me...
>
James:

Thanks for the help. I decided to just start over
since I only had a week or so ago installed the
system. I did not have too much time involved with
this setup.

I have used Slackware for years and decided to try
Ubuntu and am still trying to find my way around the
system.

Thanks again.



-- 

Frank Hahn

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the ubuntu-users mailing list