On 06/02/2008, Steve Ward <[EMAIL PROTECTED]> wrote: > On Feb 5, 2008 12:59 PM, Bob Proulx <[EMAIL PROTECTED]> wrote: > > > > > > > Wilfred wrote: > > > It would be great if rm supported moving a file to a freedesktop.org > > > compliant trash folder. This woud save much heartache by giving a > > > 'safer' option for newbies. > > > > This is easily done. Simply create an alias that moves the file > > instead of removing it. > > > > alias rm="mv --target-directory=$HOME/.Trash/" > > > > But please don't make this a system default since this behavior is not > > appreciated by many. > > > > Bob > > > > > > > > > > > > _______________________________________________ > > Bug-coreutils mailing list > > Bug-coreutils@gnu.org > > http://lists.gnu.org/mailman/listinfo/bug-coreutils > > > > > Additionally, I use the --backup option to prevent overwriting existing > files & folders in the trash (in order to be similar to the "Recycle Bin" > behavior). > > # my del > alias del='mv --verbose --backup=simple --suffix=$(date +".(%F_%T)") > --target-directory=$HOME/.Trash/' > > > Steve > >
[EMAIL PROTECTED] ~ $ mkdir testdel [EMAIL PROTECTED] ~ $ alias del='mv --verbose --backup=simple --suffix=$(date +".(%F_%T)") --target-directory=$HOME/.Trash/' [EMAIL PROTECTED] ~ $ del testdel mv: accessing `/home/wilfred/.Trash/': No such file or directory The trash directory on KDE is ~/.local/share/Trash and I believe it's the same for Gnome. What's more the trash directory is divided into files/ and info/ and a file cannot just be moved to the files directory without creating a .trashinfo file or trash viewers will not show the deleted file. More information at http://www.ramendik.ru/docs/trashspec.html As moving to the file to the appropriate file and creating the appropriate info is somewhat more involved I'd envisaged something like a 'rm --trash' option, since it wouldn't affect backward compatibility. Wilfred _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils