Recovery Script

Hi

I would like to make a script where, if a file is deleted in unix by any chance or by mistake, can it be recovered through a script... if yes what all commands will be needed. Could you please guide me in this case, to understand the concept.

Help will be highly appreciated

Fine requirement. But to my knowledge files once deleted cannot be recovered :smiley: as its removed from the memory once for all. If required we would be able to find if any files get deleted or not over a period of time.

The recovery process heavily depends on the way you backed up your files.
Without a backup an undelete is not possible with the tools a shell script provides. The data your files contained may still be on your disk, but the inode entries are discarded.

you may can give a try with the scalpel tool

How To Recover Deleted Files/Data In Ubuntu Linux

Is this file getting updated continuously or just a config file?