[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: Bob Proulx
Subject: Re: Feature request: rm option that supports trash (plain text)
Date: Thu, 7 Feb 2008 19:10:41 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

Wilfred wrote:
> 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

Right.  You would need to make the directory first.

> 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

The gentoo howto referenced in the FAQ may be more appropriate for you
since there appears to be more actions to accomplish the task.

> http://www.ramendik.ru/docs/trashspec.html

That URL times out for me and is not accessible.

> 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.

Since this is very easy to create using either an alias or a script it
does seem like a good match to move this into the program itself.
Utilities such as rm are intended to be building blocks to be used in
applications.  They are not intended to be large all encompassing
environments by themselves.  It is good to make designs modular and to
build up more complex applications using simpler ones.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]