How to recover deleted files?
Using Ubuntu 10.10, I have a startup script that automatically removes my 'working directory'. This is a simple folder on my Desktop where I place a bunch of files that I use throughout the day. These are temporary files I need to store just for that one session. In order to keep things clean, my startup script does:
rm -rf /home/user/Desktop/workdir mkdir /home/user/Desktop/workdir
Works great. Till the moment I had some important files there and forgot to move them before shutting down. A few (2-3) sessions ago this happened and I now realize I need to recover the "workdir" directory. But several new ones have been created and removed in the meantime. What is the best way to recover this - if possible? I read about tools like scalpel but it seems they will scan my whole HD. I know the name of the folder and would like to just look for this workdir folder. What is best?
UPDATE - attempt with Foremost
I have used foremost to try to recover my files. I used:
sudo foremost -a -t doc -i /dev/sda1 -o/home/user/Desktop/foremost
Apparently, I have been removing many documents. So many files were recovered that I had to remove other files on the fly in order to not fill up my hard drive. Over 30GB of XLS/PPT/OLE(?)/Word files were restored. I had to break off the restore process. For Word documents, I have now over 7GB in 3,050 files. How to I get to the right file? They are all numbered, and the date of modification is today for all files.
Also, I need to restore 3 other JPG files as well. This might become an ever larger set of files. How can I only recover what was removed in the last week? Or by using the original filename, is that possible?