Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-28-2009, 04:51 AM   #1
LQ Newbie
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
Recovery of text files

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.
Old 08-28-2009, 05:50 AM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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:
Old 08-28-2009, 06:09 AM   #3
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 404Reputation: 404Reputation: 404Reputation: 404Reputation: 404
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert DOS text files to UNIX text files ta0kira Linux - Software 7 03-15-2011 11:42 AM
[SOLVED] can add a text line to text files? windstory Linux - Newbie 4 08-25-2009 06:40 AM
Steps needed to convert multiple text files into one master text file jamtech Programming 5 10-07-2007 11:24 PM
Recovery of Windows files NiSchmi Linux - General 3 03-17-2006 07:41 AM
Recovery Text File Gerardoj Linux - General 1 03-26-2004 01:51 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:45 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration