safely delete

Rutger van Haasteren rvhaasteren at gmail.com
Thu Jan 11 10:39:31 UTC 2007


Thank you for that reply, I didn't know this...

Rutger

On 1/11/07, Ulf Rompe <Ulf.Rompe at icem.com> wrote:
>
> Am Mittwoch, den 10.01.2007, 16:03 +0100 schrieb Bram Kuijper:
> > is there any equivalent to the rm command so that files are not
> > getting deleted, but just moved to a thrash can?
>
> No need for a package or a shell script. Just add this line to your
> ~/.bashrc :
>
> alias rm="mv --target-directory=${HOME}/.Trash --backup=numbered"
>
> That means: Every time you type "rm yada.txt" the shell reads it as "mv
> --target-directory=${HOME}/.Trash --backup=numbered yada.txt". The
> backup parameter enables a logic that moves the file as "yada.txt.~1~"
> if "yada.txt" already exists in your trash can.
>
> Please note that changing ~/.bashrc only affects shells opened after the
> file has been saved. To reread it in an existing shell, just type
> ". ~/.bashrc". You may check your defined aliases by just typing
> "alias", "alias rm" or "type -a rm".
>
> [x] ulf
>
> --
> Der Computer ist die logische Weiterentwicklung des Menschen:
> Intelligenz ohne Moral. (John Osborne)
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070111/38507fe9/attachment.html>


More information about the ubuntu-users mailing list