LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-23-2006, 02:56 AM   #1
v1nc3nt
Member
 
Registered: Feb 2006
Location: East London ,South Africa
Distribution: Red Hat 9
Posts: 42

Rep: Reputation: 15
How to recover deleted file


i delete a file using rm -rf command

how do i recover this
 
Old 05-23-2006, 03:04 AM   #2
dubz_444
Member
 
Registered: Mar 2006
Location: South Africa
Distribution: Arch Linux
Posts: 43

Rep: Reputation: 15
with great difficulty.

i remember though there was an article about it in the linux gazette
google it.
 
Old 05-23-2006, 03:08 AM   #3
jesuscakes
Member
 
Registered: May 2006
Posts: 83

Rep: Reputation: 15
Quote:
Originally Posted by dubz_444
with great difficulty.

i remember though there was an article about it in the linux gazette
google it.
Ouch. Is this the article in question?: http://linuxgazette.net/issue86/artime.html
 
Old 05-23-2006, 03:09 AM   #4
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
There are a range of threads in these forums about recovering lost files.
In general - if this is on an ext2 fs there are "recover" utilities for your pleasure. If this is on a journalling fs like ext3 - you will have a tougher time of it. The file is all-but [tone=portentious]gorn[/tone].

The unix method is to grep through the partition for it.
http://www.linuxquestions.org/questi...t=recover+grep
http://www.linuxquestions.org/questi...d.php?t=428962
http://www.linuxquestions.org/questi...grep+partition
 
Old 05-23-2006, 03:16 AM   #5
dubz_444
Member
 
Registered: Mar 2006
Location: South Africa
Distribution: Arch Linux
Posts: 43

Rep: Reputation: 15
the linux gazette article was the unix method of grep-ing . its works sort of...

was a good few years ago though
 
Old 05-23-2006, 03:28 AM   #6
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
Originally Posted by dubz 444
the unix method of grep-ing . its works sort of...
sort-of is right. It is brilliant for anything text related or if you know your target. But a long arduous task for general file recovery... especially compressed, encrypted, or binary files. You really have to know your stuff, and it's hard to automate.

There are also a range of "forensic" distros around (another google search term) which can do better.

rm -rf is, of course, one of those commands you do not use. Data recovery is what the trash bin is for.

Some people make a trash directory for CLI use, and a script in their path called "can" or something. All "can <filename>" does is move the offending file to the trash directory. (Though you can also rig something to clear the trash directory when you logout or some other condition is met).

Last edited by Simon Bridge; 05-23-2006 at 03:33 AM.
 
  


Reply


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
Can I recover a deleted file in Linux ? josedsilva Linux - General 10 01-05-2010 07:49 AM
how to recover deleted file & folder in linux(i m in huge trouble) mickyman Linux - General 1 04-17-2006 01:30 AM
How to recover a deleted file from ext3 filesystem ? Honor Linux - Software 1 12-21-2005 12:36 PM
Recover deleted files? subaruwrx Linux - Newbie 8 06-04-2004 08:47 AM
Recover My Deleted File & Folder rajaniyer123 Linux - General 0 03-12-2004 12:51 AM


All times are GMT -5. The time now is 10:14 AM.

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