[H-GEN] Help! Is there any advice on recovering deleted files?

Greg Black gjb at gbch.net
Mon Aug 18 21:23:14 EDT 2003


On 2003-08-19, Harry Phillips wrote:

> I run Mandrake and in my /etc/profile.d/alias.sh file there is a line:
> 
> alias rm="rm -i"
> 
> It makes every rm interactive without having to specify it on the 
> command line.

And it's one of the biggest mistakes that beginners can make
because it teaches you that rm(1) is "safe".  But one day you'll
sit down at some standard Unix system that lacks that silly
alias and you'll cut yourself off at the knees.

The "right" solution to all these things is to learn the correct
syntax and teach your fingers to use it.

If you must have an alias, it should *not* be called "rm", but
something that is actually safe.  I suggest "irm" as an alias
for "rm -i" -- if you use irm on a system without the alias,
you'll just get "irm: command not found".

I don't recommend the probably more obvious alias "rmi", because
a little slip of the fingers could still spell a nasty surprise:
you intended to type "rmi *", but you misplace the space and
type "rm i*" and "important.doc" goes up in smoke without even a
hint that it happened.

Cheers, Greg

-- 
Greg Black <gjb at gbch.net> <http://www.gbch.net/gjb.html>
GPG signed mail preferred; further information in headers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 249 bytes
Desc: not available
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20030819/01bc0531/attachment.sig>


More information about the General mailing list