[olug] Unix Tip: CREATING TRASH

Unix Guru Universe listserv at ugu.com
Sat Jan 4 18:54:52 UTC 2003


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

			      UNIX GURU UNIVERSE 
			         UNIX HOT TIP

			Unix Tip 1830 - January  4, 2003

		    http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


CREATING TRASH

Sometimes unwittingly we may delete 
some important files and realise it 
later. To avoid such a situation, 
you can use this following idea. 

Create a small bash script containing
the line

mv $1 ~/trash/  

Save this file in your home say 
".srm" (safe rm) and in your 
".bashrc" enter this line:

alias rm='~/.srm' 

Now whenever you delete any files 
it will go to "trash" directory 
instead of deletion.  You will 
have to create a "trash" directory 
in your home directory.


This tip generously supported by: smk_bk at yahoo.com





--------------------------------------------------------------------------
To Subscribe:    http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe:  http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX 
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU  ADVISES THAT 
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips at ugu.com - Copyright 1994-2001
==========================================================================




More information about the OLUG mailing list