Rutger van Haasteren
rvhaasteren at gmail.com
Thu Jan 11 08:04:36 UTC 2007
A trash can already exists in your home directory: /home/yourname/.Trash/
I would suggest making a simple shell script that moves everything here
instead of deleting it, so you don't have to put the destination in your
commands. Since these trash cans are user specific, it must be set to
include the home directory.
Thus put a file in your /usr/local/bin called 'del' or something and chmod
it with: chmod 755 del
mv $1 /home/`whoami`/.Trash/
On 1/10/07, Jeffrey F. Bloss <jbloss at tampabay.rr.com> wrote:
> Bram Kuijper wrote:
> > Hi all,
> > I know this is a beginner question, but is there any equivalent to
> > the rm command so that files are not getting deleted, but just moved
> > to a thrash can?
> > Searching for it in Google helped me find a number of shell scripts
> > more or less achieving this, but I wonder if there is any package
> > that does the same?
> The trashcan is just another directory. No need for a fancy shell script
> I'd think, just replace 'rm' with 'mv' on the command line and append
> the destination. Something like 'mv <files> ~/.Trash' should suffice.
> _?_ Outside of a dog, a book is a man's best friend.
> (o o) Inside of a dog, it's too dark to read.
> -oOO-(_)--OOo-------------------------------[ Groucho Marx ]--
> grok! Registered Linux user #402208
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ubuntu-users