Protection from the dreaded "rm -fr /"
Chris Howells
lists at chrishowells.co.uk
Mon Oct 4 18:16:42 PDT 2004
On Monday 04 October 2004 09:08, Mark Murray wrote:
> Yeah.
>
> $ alias rm="rm -i"
>
> and you get the annoying "confirm all deletes" behaviour.
Remember that -r over-rides -i, so the warning does not appear:
bash-2.05b$ mkdir blah
bash-2.05b$ rm -irf blah
bash-2.05b$ mkdir blah
bash-2.05b$ rm -if blah
rm: blah: is a directory
bash-2.05b$ rm -ir blah
remove blah? y
bash-2.05b$
--
Cheers, Chris Howells -- chris at chrishowells.co.uk, howells at kde.org
Web: http://chrishowells.co.uk, PGP ID: 0x33795A2C
KDE/Qt/C++/PHP Developer: http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20041004/f3e96f44/attachment.bin
More information about the freebsd-hackers
mailing list