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.
No comments:
Post a Comment