[Gllug] recover deleted files

t.clarke tim at seacon.co.uk
Sun Nov 30 11:23:12 UTC 2008


The problem with deleting files is that every so often you find you have deleted
something previously that you now need !
The 'windows' approach of not actually deleting but moving into a 'trash' folder
is in many ways a good one; providing you periodically clean up the trash folder

Due to people at work occasionally asking me to recover something they deleted
'last week sometime' on a multi-user 'nix system, I replaced the 'rm' command
they would normally use with an alternative which works on a similar 'trash'
directory basis.  In addition it will not overwrite a saved-file of the same
name, so earlier deletedversions of the same file are still recoverable.
It works on the basis of a separate trash directory for each mounted file
system, to avoid the overhead of doing physical copying;  files are 'deleted'
by simple renaming.    A cron job then runs every so often to physically
deleted files from the trash directories that are over a certain number of days
old.

One should always of course have a series of backups in any event - something
that one always does on systems at work but somehow often gets done rather
infrequently on home systems!

Tim
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list