well, I've trashed my system ...again ;)

Shot - Piotr Szotkowski shot at hot.pl
Tue Apr 12 10:54:18 UTC 2005


Hello.

Kenton Brede:

> Instead of running "rm -RF /directory/*" test the command first with
> something like "echo /directory/*" which won't tell you exactly what
> "rm -RF" is going to do but might be enough of a clue to stop you from
> doing something like deleting /var. 

Or simply prepend the `rm -RF /directory/*` command with echo,
like this: `echo rm -RF /directory/*`. I use it all the time
with find, when doing mass changes to selected sets of files, e.g.
find . -type f -exec echo chmod -x {} \;

> You can also use the "-i" option with "rm" so
> you will be prompted before you remove something.

Or set up a permament alias rm='rm -i' - WARNING: if you rely on this
too much, you WILL some day delete something you didn't want to delete
on an account that doesn't run this alias.

Cheers,
-- Shot
-- 
      Well, the old ones go Mmmmmbbbbzzzzttteeeeeep as they start up
      and the new ones go whupwhupwhupwhooopwhooooopwhooooooommmmmmmmmm.
                                   -- Graham Reed on subway engines, asr
====================== http://shot.pl/hovercraft/ === http://shot.pl/1/125/ ===
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050412/7df0ee41/attachment.sig>


More information about the ubuntu-users mailing list