commands are in the /usr/bin directory, so this wont work.
Heh. I was pondering the same thing yesterday.
got linux rescue mode and copy the files find, rpm2cpio,uniqetc. to my deleted /usr/bin.
Next time you could try mounting the CD, I mean mount lives in /bin and if you add the mounted location to your path statement it should find the binaries.
didnt know rpm could do this!
No actually it can't because it has no knowledge of concepts like restoring. Luckily
we have.
In any case it definately is a tribute to a workable package management system. With "less evolved" ones I wouldn't waste time and go for reinstallation right away.
one thing though, I ran the second script it gives all command not found errors, I guess its missing the work "chmod" in it.
Well, thats what I wrote as in "exercise for the reader"... Thinking about it a bit more we also need to re-establish symbolic links so this should do it:
Code:
cd /usr/bin; rpm -qa --dump|grep /usr/bin|awk '{print $1, $5, $6, $7, $NF}'|while read bin p o g l; do
if [ "$l" != "X" ] ; then ln -sf $l $bin; else chown $o.$g $bin; chmod ${p:3} $bin; fi; done
Now when you "rpm -Va --noscripts" all should be more or less relatively well, though YMMV(VM).