Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-10-2005, 05:57 AM   #1
Registered: May 2004
Location: Iceland
Distribution: Ubuntu Dapper Drake
Posts: 172

Rep: Reputation: 30
Question rm -R, lost my files, any way to recover? mm.. :)

mm.. I removed some files I had, mainly some code I had been doing. I had the directory ~/Projects/learn/code/ and then i had a link to "learn" at ~/public_html/programming/ , I for some reason thought that the directory "code" was a link to a directory and not a real directory and i did rm code , didn't work, so i did rm -R code and then it worked, but soon i realized that it wasn't a link and that I had removed all my code..

Is there any way to recover from a rm command? I don't have any backups.
Old 05-10-2005, 06:39 AM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Sorry I didn't paste a link on the previous message. First try the midnight commander program on your system. It has an undelete tool. Also, google for "linux undelete" or "linux recover" for utilities that may do this. It depends on what filesystem you are using. It may or may not be possible.

For text files you may be able to grep for the file on the raw device:
grep -a '#include' /dev/hda1
This may be hit and miss and a lot of work, but it has been done. It helps if you know how they begin. Also, copying the raw device to an image file on another drive, and maybe using split to make the process more manageable may help you recover the information.

Last edited by jschiwal; 05-12-2005 at 04:19 AM.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recover lost NTFS files from Linux??? tarwood Linux - Newbie 4 06-30-2005 03:02 PM
recover lost DOS files 90-60-90 General 5 02-16-2005 09:41 PM
Data Lost! Is It Possible To Recover? rddreamz Linux - Newbie 3 11-17-2003 10:15 PM
Recover a lost partition!!!!! Caveman Linux - Newbie 4 09-26-2003 01:10 PM
Recover lost files? chup Linux - General 2 08-23-2003 10:28 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:27 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