Linux: Question - Recovering files
Hi to all,
I would like to know how I can recover files in linux. This is what happened: I had a large file (> 1GB) named file1.txt. By mistake I wrote: mv file0.txt file1.txt, where file0.txt was empty (0K). Now all information from file1.txt is gone. Is there a way to recover it ? file1.txt was arranged in 2^21 (2097152) rows x 54 columns, filled with doubles precision numbers. The file system is ext3. Any suggestion ? Goicox |
I don't believe you are going to be able to recover that file. The mv command is essentially the combination of the cp and rm commands. So when you mv file0 to file1 it overwrote file1 and deleted file0.
I'm sorry to be the bearer of bad news. :( HTH, Centinul |
Hi,
Ooooops! You might not be able to recover your file. Your system may have already re-used the space (or part of it) for something else. This is a very good persuader to backup your important files. When you issue commands to a linux system it won't make you get down on your knees and beg and reaffirm and reaffirm the affirmation and then ask if you are sure ten or twenty times (although some gui apps will do this). Backups have saved my bacon numerous times since the 80s. See http://www.trinityhome.org Look at their recovery tools. I used them on some drives to recover some of the data that was lost when the OS failed (Windows or course). Don't use the computer with the lost data as it may (certainly will eventually) overwrite the data you hope to recover. This is a very time consuming process and you may end up with little or nothing. Good luck. Bill |
All times are GMT -5. The time now is 03:40 PM. |