On Tue, Jan 23, 2001 at 10:20:08AM +0100, Lars Gullik Bjønnes wrote:
> Lior Silberman <[EMAIL PROTECTED]> writes:
>
> | > Under unix-like OS, the * is expanded by the shell, not by the rm command,
> | > so the rm command never sees the *. You'd have to hack the shell, not the
> | > rm command, and the question becomes, how do you do that consistently? Do
> | > you specialcase for a command rm with one of the arguments being * ?
> |
> | You should alias rm to be 'rm -i'. This is possible on almost all shells.
>
> And this can be equally dangerous. If you assume that "rm" really is
> "rm -i" and to a "rm *" to select the files that should be deleted...
> (and this has happend in realy life one of the reasons I really abhore
> "rm -i")
>
> Lgb
Truly, heed well Lars's words above.
You just need to be verrry verrry careful with random "rm"s (and do
backups).
The only real "solution" is to implement a "trash can" concept, where
"rm" really does not remove, but moves files to a temporary holding area
for later removal.
--
Kayvan A. Sylvan | Proud husband of | Father to my kids:
Sylvan Associates, Inc. | Laura Isabella Sylvan | Katherine Yelena
http://www.successlinks.com/kayvan | Reach your goals now! | Robin Gregory