Skip to contentSkip to conversation

recovering files after rm

DISCUSSION n mishra 6 participants 16 messages Mar 31, 2003 – Apr 2, 2003

lore
Share & tools
lore

n mishra

author
#0 lore raw

Hi all,
This probably sounds really silly but could someone please tell me if there is any way of recovering files which have been deleted using the rm command. Thanks in advance.
mishra.
_______________________________________________________________________
Odomos - the only mosquito protection outside 4 walls -
Click here to know more!
http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htm&&odomos&&wn

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw
Quoted 3 lines · n mishra

This probably sounds really silly but could someone please tell me if there is any way of recovering files which have been deleted using the rm command.

In general: there is no way.

If you are lucky, you can dump using dd your partition's data in a file and then search in the file for the missing data, but again this is not trivial and doesn't work 100%.

Elias

Signature · 9 lines
University of Athens			I bet the human brain 
Physics Department				is a kludge --Marvin Minsky 

	
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#2 lore raw
Quoted 6 lines · Elias Athanasopoulos
Quoted 3 lines · n mishra

This probably sounds really silly but could someone please tell me if there is any way of recovering files which have been deleted using the rm command.

In general: there is no way.

Yes there are ways;

There is much information and programs about undeleting files on the web, simply use www.google.com/linux and type in
"deleted files"

I got more than 100 hits and some good help.

Quoted 5 lines

If you are lucky, you can dump using dd your partition's data in a file and then search in the file for the missing data, but again this is not trivial and doesn't work 100%.

Elias

Signature · 9 lines
Regards Richard
[email protected]
http://people.zeelandnet.nl/pa3gcu/

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#3 lore raw
Quoted 8 lines · On Mon, Mar 31, 2003 at 01:14:32PM +0000, pa3gcu wrote:
Quoted 6 lines · Elias Athanasopoulos
Quoted 3 lines · n mishra

This probably sounds really silly but could someone please tell me if there is any way of recovering files which have been deleted using the rm command.

In general: there is no way.

Quoted 7 lines

Yes there are ways;

There is much information and programs about undeleting files on the web, simply use www.google.com/linux and type in
"deleted files"

I got more than 100 hits and some good help.

He asked for rm.

Elias

Signature · 9 lines
University of Athens			I bet the human brain 
Physics Department				is a kludge --Marvin Minsky 

	
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#4 lore raw
Quoted 11 lines · Elias Athanasopoulos
Quoted 10 lines · On Mon, Mar 31, 2003 at 01:14:32PM +0000, pa3gcu wrote:
Quoted 6 lines · Elias Athanasopoulos
Quoted 3 lines · n mishra

This probably sounds really silly but could someone please tell me if there is any way of recovering files which have been deleted using the rm command.

In general: there is no way.

Yes there are ways;

Quoted 7 lines
Quoted 5 lines

There is much information and programs about undeleting files on the web, simply use www.google.com/linux and type in
"deleted files"

I got more than 100 hits and some good help.

He asked for rm.

... and Richard gave him a good answer. In particular, this link (turns up as #2 when I actually try what Richard suggested)

http://sdb.suselinux.hu/en/sdb/html/cg_rmfiles.html

gives advice that should work fine for files deleted using rm.

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#5 lore raw
Quoted 11 lines · Ray Olszewski
Quoted 2 lines · Elias Athanasopoulos

He asked for rm.

... and Richard gave him a good answer. In particular, this link (turns up as #2 when I actually try what Richard suggested)

http://sdb.suselinux.hu/en/sdb/html/cg_rmfiles.html

gives advice that should work fine for files deleted using rm.

It's what I said in the paragraph Richard didn't (probably) read.

Elias

Signature · 9 lines
University of Athens			I bet the human brain 
Physics Department				is a kludge --Marvin Minsky 

	
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#6 lore raw
Quoted 4 lines · Elias Athanasopoulos
Quoted 3 lines · Ray Olszewski
Quoted 1 line · Elias Athanasopoulos

He asked for rm.

Quoted 8 lines
Quoted 6 lines

... and Richard gave him a good answer. In particular, this link (turns up as #2 when I actually try what Richard suggested)

http://sdb.suselinux.hu/en/sdb/html/cg_rmfiles.html

gives advice that should work fine for files deleted using rm.

It's what I said in the paragraph Richard didn't (probably) read.

Enlighten me/us please !!!!!.

Quoted 1 line

Elias

Signature · 9 lines
Regards Richard
[email protected]
http://people.zeelandnet.nl/pa3gcu/

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#7 lore raw
In reply to Elias Athanasopoulos
Quoted 11 lines · Elias Athanasopoulos
Quoted 10 lines · On Mon, Mar 31, 2003 at 01:14:32PM +0000, pa3gcu wrote:
Quoted 6 lines · Elias Athanasopoulos
Quoted 3 lines · n mishra

This probably sounds really silly but could someone please tell me if there is any way of recovering files which have been deleted using the rm command.

In general: there is no way.

Yes there are ways;

Quoted 7 lines
Quoted 5 lines

There is much information and programs about undeleting files on the web, simply use www.google.com/linux and type in
"deleted files"

I got more than 100 hits and some good help.

He asked for rm.

Yes indeed he did, i gave an answer concerning "files" deleted with the 'rm' command. So what is your point,?????

Most all of the hits one gets in google from "deleted files" concerns files deleted with the 'rm' command. Now what did i misread and where did i go wrong.??? Please enlighten me.!!!!!

Quoted 1 line

Elias

Signature · 9 lines
Regards Richard
[email protected]
http://people.zeelandnet.nl/pa3gcu/

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#8 lore raw
Quoted 10 lines · On Mon, Mar 31, 2003 at 07:34:32PM +0000, pa3gcu wrote:
Quoted 2 lines · Elias Athanasopoulos

He asked for rm.

Yes indeed he did, i gave an answer concerning "files" deleted with the 'rm' command. So what is your point,?????

Most all of the hits one gets in google from "deleted files" concerns files deleted with the 'rm' command. Now what did i misread and where did i go wrong.??? Please enlighten me.!!!!!

The google's hits you mention do what I said in my last paragraph (first post).

Recall that I said: In *general* there is no way. Noone of these tools can succeed in all cases. And this is becuase Unix - and Linux based OSes in our case - are multi-user Operating Systems. A free i-node can be used by another user's process the next second you rm your file.

Elias

Signature · 9 lines
University of Athens			I bet the human brain 
Physics Department				is a kludge --Marvin Minsky 

	
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#9 lore raw
Quoted 11 lines · Elias Athanasopoulos
Quoted 9 lines · On Mon, Mar 31, 2003 at 07:34:32PM +0000, pa3gcu wrote:
Quoted 1 line · Elias Athanasopoulos

He asked for rm.

Yes indeed he did, i gave an answer concerning "files" deleted with the 'rm' command. So what is your point,?????

Most all of the hits one gets in google from "deleted files" concerns files deleted with the 'rm' command. Now what did i misread and where did i go wrong.??? Please enlighten me.!!!!!

Quoted 7 lines

The google's hits you mention do what I said in my last paragraph (first post).

Recall that I said: In *general* there is no way. Noone of these tools can succeed in all cases. And this is becuase Unix - and Linux based OSes in our case - are multi-user Operating Systems. A free i-node can be used by another user's process the next second you rm your file.

Even DOS or widows cannot always recover deleted files, one has to do quite complicated things, your approach saying in "General" there is no way is simply NOT true period. I still dont quite understand your origanal statement, i quote;

" If you are lucky, you can dump using dd your partition's data in a file and then search in the file for the missing data, but again this is not trivial and doesn't work 100%. "

Just what do you mean dump with dd, i am not saying it is not a possability, but there are far more reliable ways of retriving deleted files out there you know and No i am not saying other ways are 100% but the chances are files "are" recoverable.
One point, the longer one waits before trying to recover deleted files the less chance there is of retriving them.

Quoted 1 line

Elias

Signature · 8 lines
Regards Richard
[email protected]
http://people.zeelandnet.nl/pa3gcu/
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#10 lore raw
Quoted 4 lines · On Mon, Mar 31, 2003 at 08:27:13PM +0000, pa3gcu wrote:

Even DOS or widows cannot always recover deleted files, one has to do quite complicated things, your approach saying in "General" there is no way is simply NOT true period. I still dont quite understand your origanal statement, i quote;

I can't speak for Windows, because there are major differencies between Windows variants, but MS-DOS is a single-process, single-user OS and its filesystem is based in allocation tables; not i-nodes. FAT's stucture is not so dynamic as the tree-based structure of ext2; not to speak about ext3.

In MS-DOS undeleting files is trivial, i.e. the process of undeleting (programmatically) is really trivial, and the chances to retrieve the missing file are a lot. Of course you pay for this kind of simplicity, because DOS has other major disadvantages, such as fragmentation (i.e. when a file is deleted a hole in the fs is created, which most probably will dissapear after a defragmentation process; as long as you don't defrag you have *great chances* of undeleting your file).

OTOH no Unix fs has designed for undeleting files. *Noone*. Read the specs for UFS, ext2, minixfs, etc. There is no undeleting feature by design, because they are created for multi-process, multi-user enviroments, which makes undeleting difficult and, last but not least, an undeleting feature would need major redesign of the filesystem, resulting to a new fs with quite a lot of problems such as less speed in data manipulation, fragmentation, etc.

I stand in my original position. I think it's good for newbies to know that there is no trivial or general way to *always* come back from rm. Removing files means removing files for ever, and users/admins should use rm with caution. Solutions are hacks, such as debugfs: a tool for testing the ext2 implementation, which don't always work.

ANW, I believe that the thread must die here. :-)

Elias

Signature · 9 lines
University of Athens			I bet the human brain 
Physics Department				is a kludge --Marvin Minsky 

	
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#11 lore raw
Quoted 1 line · Elias Athanasopoulos

ANW, I believe that the thread must die here. :-)

Thats your porgative, you started the thread so the honour is yours. I only directed someone to an URL where it is explained HOWTO do what the question was all about period.

Thread dead ok...

Quoted 2 lines

Elias

Signature · 9 lines
Regards Richard
[email protected]
http://people.zeelandnet.nl/pa3gcu/

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#12 lore raw
In reply to n mishra

I am using the program safedelete. It works well and is easy to install just follow the instructions to set it up.

Regards

Signature · 7 lines
Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#13 lore raw
Quoted 2 lines

I am using the program safedelete. It works well and is easy to install just follow the instructions to set it up.

Very puzzling response. The thread is about how to recover a deleted file, but SafeDelete offers, as best as I can make out, only a commercial Annihilator application for Windows. It is one of a number of programs that overwrites hard disks so that information can't be retrieved from them. This is quite the opposite of the original question.

I thought maybe this application might redirect rm commands to put the files instead into a "trashcan" that is periodically "emptied," but even that would be OT for the original question.

Haines Brown
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#14 lore raw
Quoted 1 line
Quoted 1 line

I am using the program safedelete. It works well and is easy to install

just

Quoted 8 lines
Quoted 1 line

follow the instructions to set it up.

Very puzzling response. The thread is about how to recover a deleted file, but SafeDelete offers, as best as I can make out, only a commercial Annihilator application for Windows. It is one of a number of programs that overwrites hard disks so that information can't be retrieved from them. This is quite the opposite of the original question.

I know nothing about Windows!!

As for safedelete in Linux,

In ~/.bashrc one puts:

alias rm="/usr/bin/safedelete -i"

then when one does a rm file, see below

man safedelete

DESCRIPTION
safedelete provides a way to safely delete files so they can be undeleted on demand. safedelete `deletes' files by copying them to a safedelete directory which is specified at install time. Files processed by safedelete are given a new unique filename after they are placed in the safedelete directory. This allows multiple copies of the same file to be safedeleted without having to worry about collisions with existing files.

Each user has a log file containing the names of all the files they can currently undelete (see the undelete manual page for details on undeleting files). The log file name is .safedelete.log and is kept in each users $HOME direc­ tory.

Each user has a safedelete subdirectory within their $HOME
directory. The subdirectory name is set during the
installation of safedelete and defaults to .Safedelete. See your system administrator for the subdirectory name on your system.

Signature · 7 lines
Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs