RPM's
James Wilkinson
james at westexe.demon.co.uk
Sun Jan 9 23:48:40 UTC 2005
Johnathan Bailes wrote:
> (Never do this as root)
> find / name core -exec rm {} \;
>
> The guy who did this forgot the dash and deleted everything from / down.
James McKenzie commented:
> Yep, about the same as typing in rm -rf * as root at \ (root directory).
>
> Actually, this is a very bad way of removing core files. One should do
> the find and redirect it to a list file. Read through the file to
> insure that no needed files are there (someone once named a critical
> executable core) before running the rm command.
The -ok option to find is worth using, too: it works just like -exec,
but prints a confirming prompt first.
There are occasions when you may want to script find (and put it into a
cron job, for example). In that case, about all you can do is script
carefully and test after a good backup.
And yes, I've had People Who Should Know Better not know why "core" is a
Bad Name for a file. Personally, I wish it had been ".core".
James.
--
E-mail address: james | Power corrupts, PowerPoint corrupts absolutely.
@westexe.demon.co.uk | -- Vint Cerf
More information about the fedora-list
mailing list