[Gllug] Is this funny

tet at accucard.com tet at accucard.com
Wed Jan 2 16:52:58 UTC 2002


>Could you have an amended "rm" that moves deleted stuff to somewhere
>like this instead of deleting it totally. Then some switch to *really*
>delete this when you're sure?

	mkdir "$HOME/.trashcan"
	rm()
	{
		mv -f "$@" "$HOME/.trashcan"
	}
	alias realrm=/bin/rm

Then either empty trashcan manually when needed, or via a cron job. Of
course, it's far from ideal. Removing large files (say an ISO image)
that reside on a different filesystem to $HOME (or wherever else
you've chosen to put your trashcan) will not be optimal, to say the
least. Plus, you're unlikely to make yourself popular with the system
administrator when your trashcan directory starts using too much disk
space -- unless the sysadmin is yourself, or course...

Tet

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list