LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Recovery of text files (https://www.linuxquestions.org/questions/linux-software-2/recovery-of-text-files-750827/)

s5s 08-28-2009 04:51 AM

Recovery of text files
 
Hello
I accidentally moved my Desktop folder to another place and removed it without realising I've done mv instead of cp. I am only interested in recovering the text files which were scripts and some results of work I've done. In the mix I had an iso, mp3 and some rars etc which are of no value as I have a copy. I still have the terminal that issued the rm -r command open and I have nautilus on $HOME/Desktop showing the previous desktop state but files are empty when you open them.

pixellany 08-28-2009 05:50 AM

Welcome to LQ!!

The trick is to not cause any more writes to that disk. Ideally, you should run from another system or a live CD while attempting recovery.

the most often recommended tools are testdisk and photorec (These are related and are from the same website: http://www.cgsecurity.org/wiki/TestDisk)

i92guboj 08-28-2009 06:09 AM

pixellany said most of it.

You should umount (or mount read-only) that partition as soon as possible. Photorec can search for patterns and restore a number of file formats, however, if they were just plain text files without any special formatting (i.e., not openoffice docs) then a simple grep on the device node will work as well, or maybe better. You can just grep for pieces of the text, the more you remember the easier it will be. Manual work will be required.

I know no automated way to recover files. I've heard of ext3 undelete tools in the past, but never tried one.


All times are GMT -5. The time now is 01:05 PM.