Handle deleted files

swetha's Avatar
Newbie Member
Hi All,

I would like to know how to write a script file in linux which does the following.
whenever a file is deleted, it should be placed in a temporary folder so that we can recover it later as and when required.

The script file can contain alias for rm command as mv command. whenever rm command is issued it should do the mv command.

Actually, i am not getting the complete syntax to write this alias for this.

thanks
swetha
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
See if How to get deleted files in Linux helps you.