Re: [SLE] Crash recovery tool



rpm -V `rpm -qa` is a good shortcut for the command below.

On 12/6/05, Roger Oberholtzer <roger@xxxxxx> wrote:
>
> On Mon, 2005-12-05 at 16:17 +0100, Carlos E. R. wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> >
> > The Monday 2005-12-05 at 15:50 +0100, Roger Oberholtzer wrote:
> >
> > > Is there a tool that can check all the installed packages and see that
> > > there are no missing or corrupt files? A list would be fine. I can do
> > > the grunt work to locate the packages. But I am unsure how to generate
> > > such a list. Especially if I want to check bad files as well as
> missing
> > > ones.
> > >
> > > Any pointers?
> >
> > rpm --all --verify --nomd5 | tee rpmlist
> >
> > And then, some work.
> >
> > Verifying a package compares information about the installed
> files
> > in the package with information about the files taken from the
> > package metadata stored in the rpm database. Among other things,
> > verifying compares the size, MD5 sum, permis sions, type, owner
> and
> > group of each file. Any discrepencies are displayed. Files that
> > were not installed from the package, for example, documentation
> > files excluded on installation using the "--excludedocs" option,
> > will be silently ignored.
> >
> >
> > For example, to generate a list of modified files (for backup), I do:
> >
> > rpm --all --verify --nomd5 \
> > | tee $LISTOFNOTVERIFIEDFILESINRPMS \
> > | sed -n 's/^S.* \///p;s/^\.......T.* \///p' \
> > | sort > $LISTOFMODIFIEDILESINRPMS &
> >
> > I got this from what Yast backup does. I think you must be looking for
> > lines like this one:
> >
> > missing /usr/lib/python
>
> I found this variation as well:
>
> rpm -qa | xargs -i sh -c 'echo {} ; rpm -V {} ; echo ""'
>
> It also prints the names of the packages, making it easier to locate who
> has the potential problem. Using this, I located the packages with
> missing files. They were the expected ones, as fsck was listing names
> from them when sorting out the file system problems.
>
> So, this is a command I will keep in a safe place!
>
> --
> Roger Oberholtzer
> OPQ Systems AB
>
>
>
> --
> Check the headers for your unsubscription address
> For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
> Also check the archives at http://lists.suse.com
> Please read the FAQs: suse-linux-e-faq@xxxxxxxx
>
>
>


Relevant Pages