• Notice regarding image hosts and attachments. See here.

undelete linux

Caporegime
Joined
18 Oct 2002
Posts
32,780
Probably too late to do anything now but perhaps for future reference this would be useful.


I made the horrible mistake of making a bash script which batch deletes some files, and accidentally put the the wrong directory name in. 3 days of simulation time wasted, and on monday I have to hand in a report with my result. Should just about be able to get the work done on time.

But, what is the best way to recover files? I only have a single HD so unmounting the drive would be a pain.

The files were text files, containing 100 lines of text which conisted of more or less random real valued numbers (0.264,32.8972,.etc)
Thus I do not know the starting string, just the size, old location and filename.

Grep'ing the filesystem proved to be unproductive.

I found this script which can provide partion info:
Code:
echo "DEVICE DIRECTORY FS-TYPE" > tmp; mount | cut -d" " -f1,3,5 | sort >> tmp; cat tmp | column -t | sed -e "1s/.*/`tput smso`&`tput rmso`/"
 
I think you can use debugfs to access the raw file system data to recover files, it probably wouldn't be easy though, ive never tried it but i heard thats the tool for the job. Maybe theres some 3rd party commercial apps for it as well.
 
Dj_Jestar said:
I far prefer to bare in mind that "Once it's gone, it's gone!" Rather than hack together a fallback.

yep, I have decided the data is gone and I have started my simulations again.

Off-topic:

Luckily I had the the Mean value and standard deviation of the data saved. This can allow me to do some testing, e.g. with a t-test, but I know the data was non-parametric so ideally I needed the raw data to perform a rank based test.
 
Back
Top Bottom