Here's a summary: I was programming using java and accidentally, instead of using the rm *.class command in the command-line, I used rm *.java. It took me a lot of time to finish that code. I hope someone knows a way to retrieve those files. Please help me.
You are looking for: extundelete - utility to recover deleted files from ext3/ext4 partition
To find such a package, you can try:
To use the utility install it with:
After installation invoke
Just as an alternative, since you know specifically what type of file it is...
Now open up
If your file type does not exist, add your own line. Say I want to recover a .css file and I know its around 40K. I could do add this:
The 2nd column refers to case-sensitivity, the third column refers to the upper limit for size, the 4th column is how the file starts (remember to use escaped characters) and the last column is how the file usually ends.
Use the following command (edit the disk accordingly. could check with
What will happen next is that foremost will create a folder called output and dump all the recovered data (in this case) into the folder. From there you could use