[Gllug] trashman - a trash management utility for Linux filesystem

Dan Stevens (IAmAI) dan.stevens.iamai at gmail.com
Mon Jan 30 11:41:41 UTC 2006


> First of all, Ubuntu does in fact have a wastebasket, which is used by
> desktop applications.  The files get moved first into a hidden
> directory called '~/.Trash' and you can add a waste bin to your panel
> which allows you to monitor and empty this place.

I can't say I've noticed this; I shall have to look into it.

> Why is it a bad idea to have a safe version of "rm" (or to alias rm=rm
> -i ?)  Because when you come to administer another system you won't be
> so careful about using the "rm" command, and then you'll discover that
> those files you just carelessly deleted can't be recovered, because
> that system didn't have the "safe rm" but the real rm.[1]

Well, my idea is not to replace 'rm', but to provide a separate
utility (via a separate command), which voids any possible
misunderstanding of the 'rm' command.

> A much better idea is to manage files you really care about using a
> version control system, and frequently check in changes.

I would agree, a CVS is a good idea for very important data, however I
believe for a casual, normal use, a simple trash management utility
would be much more convenient.

On 30/01/06, Richard Jones <rich at annexia.org> wrote:
> On Mon, Jan 30, 2006 at 11:06:24AM +0000, Dan Stevens (IAmAI) wrote:
> > Unlike Windows, in Linux (or Ubuntu at least) there is no apparent
> > trash collection/management, 'recycle bin' type utility and a brief
> > search does not reveal much. Perhaps the majority of Linux users feel
> > they don't have much need for it and make do happily with using 'rm'
> > or 'mv'.
> > [proposal for a utility]
>
> You won't be surprised to know that you're not the first person to
> come up with the idea of a "safe rm" command.  In fact everyone who
> starts out using Unix thinks much the same thing.  Everyone who has
> used Unix for a long time knows it's a bad idea.
>
> First of all, Ubuntu does in fact have a wastebasket, which is used by
> desktop applications.  The files get moved first into a hidden
> directory called '~/.Trash' and you can add a waste bin to your panel
> which allows you to monitor and empty this place.
>
> Why is it a bad idea to have a safe version of "rm" (or to alias rm=rm
> -i ?)  Because when you come to administer another system you won't be
> so careful about using the "rm" command, and then you'll discover that
> those files you just carelessly deleted can't be recovered, because
> that system didn't have the "safe rm" but the real rm.[1]
>
> A much better idea is to manage files you really care about using a
> version control system, and frequently check in changes.  For example,
> most documents which Merjis write get filed in our central CVS server
> (it would be every single document if the law allowed me to break the
> fingers of certain people who work here).  The CVS server is backed
> up, and allows you not just to recover accidentally deleted files, but
> old and intermediate versions of files -- much more useful than any
> "safe rm" scheme.  You can apply CVS (or a similar version control
> system) to just about any file which matters to you.
>
> BTW, if you _do_ accidentally delete that vital essay which is going
> to take you a week to redo, the best thing is probably to immediately
> pull the plug from the wall, remove the hard disk from the computer
> case and carefully mount it read-only in another machine, and use a
> disk recovery tool to get back your data.
>
> Rich.
>
> [1] Further reading:
> http://forums.macosxhints.com/archive/index.php/t-9123.html
>
> --
> Richard Jones, CTO Merjis Ltd.
> Merjis - web marketing and technology - http://merjis.com
> Team Notepad - intranets and extranets for business - http://team-notepad.com
> --
> Gllug mailing list  -  Gllug at gllug.org.uk
> http://lists.gllug.org.uk/mailman/listinfo/gllug
>
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list