Re: finding orphaned files

devzero2000 <[email protected]> Mon, 28 Jul 2008 09:50:19 +0200
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <[email protected]>
On Fri, Jul 25, 2008 at 9:36 PM, <[email protected]> wrote:

>
> > This simple script give you which rpm own which dir.
> >
> > _t_d=$(mktemp -d -p /tmp)
> > _f_f=$(mktemp -p ${_t_d} XXXXXXX)
> > for _pkg in $(rpm -qa --qf '%{name}-%{version}\n' | sort | uniq)
> > do
> >  rpm -q --qf '%{name} owns %{dirnames}\n' ${_pkg} | uniq >> ${_f_f}
> > done
> > echo "wrote ${_f_f}"
>
> thanks... I'm still not sure I found exactly what I was looking for but I'm
> close enough at this point.
>
> > FYI, rpm5 have implicit dependency on parent dir o filelinkto (so it
> > is no possible to have orphan dir for example: this resolve many
> > problem on package removal or upgrade). IMHO, Orphan file aren't an
> > issue, IMHO, if they live in /var or  in a volatile filesystem .
>
> as far as I know we have no plans to goto a different version of RPM than
> that provided with RHEL, but that is good to know.  Its a nice addition.
>

He, only one of  many. Anyway, perhaps you are interested in the orphan
directories
present in RHEL5.1. rpm5 can catch via a popt alias

rpm -Va --orphandirs

It is very efficent in discover it

If you want a list on RHEL produced by the above command i can give you if
you ask.

Regards

_______________________________________________
Rpm-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rpm-list