Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 May 2001 21:24:14 -0600 (CST)
From:      Ryan Thompson <ryan@sasknow.com>
To:        Duke Normandin <01031149@3web.net>
Cc:        Freebsd Questions <freebsd-questions@freebsd.org>
Subject:   Re: Recycle bin for FreeBSD? :-)
Message-ID:  <Pine.BSF.4.21.0105152119430.92846-100000@ren.sasknow.com>
In-Reply-To: <20010515140115.A137489@mandy.rockingd.calgary.ab.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

Duke! Haven't heard from you in a while!

I've actually already got a semi-sophisticated shell script on the
go. (It's quite similar to what you sent). I haven't had any time to
finish it, so I've just been fishing for "redi-made" solutions ;-)

The script incorporates better error checking, moves files with real
paths, preserves symlinks, and (when it's done) will implement all of the
relevant rm(1) flags properly so aliasing rm will provide compatibility.

I'll probably document and make a port out of it when it's done, as it
appears there might be a small interest in it, and there really hasn't
been much done along these lines.

- Ryan


Duke Normandin wrote to Ryan Thompson:

> On Tue, May 15, 2001 at 09:18:10AM -0600, Ryan Thompson wrote:
> > Michael P. Soulier wrote to freebsd-questions@FreeBSD.ORG:
> > 
> > > On Mon, May 14, 2001 at 02:16:24AM +0000, Ryan Thompson wrote:
> > > > 
> > > > [ Don't throw things at me, OK? :-) ]
> > > 
> > >     Tempting... :)
> > 
> > No. Don't. :-)
> > 
> > > > Is anyone aware of any simple replacement for rm(1) that mimics the
> > > > "trash" or "recycle" features of other OSes (i.e., moves the files to a
> > > > safe area under the users control).
> > > 
> > >     1. Don't delete things you want to keep. :)
> > 
> > OK, YOU tell 'em. :-)
> > 
> > 
> > >     2.
> > > 
> > > TRASH='/pub/trashfolder'
> > > function rm {
> > >     mv $* $TRASH || echo "Failed to move to trash"
> > > }
> > > 
> > >     Or something along those lines. 
> > 
> > Yeah, already whipped up something like that. My question is whether to
> > finish it, or find an existing one that works just as well.
> 
> Try the attached scripts. I hope that this is close to what you were
> looking for. Later.... 
> 

-- 
  Ryan Thompson <ryan@sasknow.com>
  Network Administrator, Accounts

  SaskNow Technologies - http://www.sasknow.com
  #106-380 3120 8th St E - Saskatoon, SK - S7H 0W2

        Tel: 306-664-3600   Fax: 306-664-1161   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0105152119430.92846-100000>