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

Re: finding orphaned files



> 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.


-greg


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