bug-coreutils
[Top][All Lists]
Advanced

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

Re: rm command delete without prompt !:-(


From: Eric Blake
Subject: Re: rm command delete without prompt !:-(
Date: Thu, 24 Jul 2008 05:32:55 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to address@hidden on 7/24/2008 1:33 AM:
| when use the command: "rm -r folder" (not empty !); it
| removes all without prompt prompts the user for whether to
| remove or not.

As well it should - this behavior is required by POSIX.  You only get a
prompt if there are read-only files or if you use the -i option (or the
GNU extension -I).

http://www.opengroup.org/onlinepubs/009695399/utilities/rm.html

That said, some people like to operate with an alias, such that when they
type 'rm', the alias expands to 'rm -i', and they don't have to remember
the -i.  I personally don't like the crutch of an alias by the same name,
because I cannot guarantee that the same aliases have been set up on
another machine, such that if I were to get used to the command on my
machine, I would be setting myself up for failure when using my same
command on another machine without the alias.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiIaGcACgkQ84KuGfSFAYCLTgCfeYu1udh/MTDcVSJQArNCngsp
PHUAnjdne9mD4wXHeSFHCXv1MwNEWUAp
=9so2
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]