Re: replacement for rm?

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

 



You can either

a) Alias rm to rm -i, which is default for the root user

b) rename rm (to rm.cmd for example) and then create a wrapper script
called rm that does whatever logic you want then calls rm (however, in
your case it would be calling mv if you wanted to move something to a
.Trash folder)

c) Don't let users on your systems that can't be trusted with basic commands.

Just a couple options.

On Nov 15, 2007 2:34 PM, Ryan Golhar <golharam@xxxxxxxxx> wrote:
> Here is a general question...
>
> Occasionally I've accidentally deleted files using rm and sometimes rm
> -rf in my home directory.
>
> Has anyone ever thought of a "safe" rm that moves files into the users
> .Trash directory instead of actually deleting the file?
>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux