Re: RPM's

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

 



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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux