[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: rm option that supports trash (plain text)
From: |
Steve Ward |
Subject: |
Re: Feature request: rm option that supports trash (plain text) |
Date: |
Sun, 10 Feb 2008 23:24:56 -0500 |
On Feb 7, 2008 5:35 PM, Wilfred <address@hidden> wrote:
> On 06/02/2008, Steve Ward <address@hidden> wrote:
> > On Feb 5, 2008 12:59 PM, Bob Proulx <address@hidden> 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
> > > address@hidden
> > > 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
> >
> >
>
> address@hidden ~ $ mkdir testdel
> address@hidden ~ $ alias del='mv --verbose --backup=simple
> --suffix=$(date +".(%F_%T)") --target-directory=$HOME/.Trash/'
> address@hidden ~ $ 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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-coreutils
>
On my own Gnome desktop (2.20.1) I can confirm there exists a folder
$HOME/.Trash and it contains no special "files/" or "info/" -- just the
items that were deleted. Also, there was no "~/.local/share/Trash".
Here are a few resources on Trash in Gnome:
http://lists.freedesktop.org/archives/xdg/2004-August/002923.html
http://mail.gnome.org/archives/gnome-kde-list/2000-December/msg00022.html
http://developer.gnome.org/doc/whitepapers/nautilus/nautilus-internals.html
> 7.6 Trash
> Nautilus uses the gnome-vfs trash system. It works by creating a trash
> directory for each mount point, when it can. The directory is called
> .Trash-username and stored in the top directory of the mount. For files on
> the same device as the user homedir $HOME/.Trash is used instead.
> ....
>
Hope that helps.
Steve
- Feature request: rm option that supports trash (plain text), Wilfred, 2008/02/05
- Re: Feature request: rm option that supports trash (plain text), Bob Proulx, 2008/02/05
- Re: Feature request: rm option that supports trash (plain text), Steve Ward, 2008/02/06
- Re: Feature request: rm option that supports trash (plain text), Bob Proulx, 2008/02/06
- Message not available
- Re: Feature request: rm option that supports trash (plain text), Wilfred, 2008/02/07
- Re: Feature request: rm option that supports trash (plain text), Bob Proulx, 2008/02/07
- Re: Feature request: rm option that supports trash (plain text), Wilfred, 2008/02/10
- Re: Feature request: rm option that supports trash (plain text), Bauke Jan Douma, 2008/02/10
- Re: Feature request: rm option that supports trash (plain text),
Steve Ward <=