| Author |
Recovery of file after removing it?
|
minal silimkar
Ranch Hand
Joined: Nov 25, 2007
Posts: 133
|
|
If I removing a file using rm command, then "rm" command will delete a name-inode map from a directory. Can I recover this removed file?
|
Minal Silimkar
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26168
|
|
Minal, Not easily if at all. If you have backups, you can do a restore from there. If not, you can look if there is a tool that can restore files (I don't know if there is one.) Even then, that assumes the file has been overwritten yet.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24045
|
|
Yes, Linux file systems aren't like FAT disks. The best thing to do in this case is IMMEDIATELY shut the machine off, and bring it up in single-user mode with the disk containing the deleted file mounted read-only (this may mean booting off of a CD, or even moving the disk to another machine.) Then you can dump the partition with the deleted file using "dd"; now you've got all the remaining data in that dump, and you can reboot the machine normally. Now, if the deleted file was a text file, you can just search the dump file for some text you know was in the deleted file. If it was something binary, then there are a few programs that can help you examine the dump, depending on what type of file system it was. For an ext2fs partition, there's the "recover" command (Google "Linux recover deleted files").
|
[Jess in Action][AskingGoodQuestions]
|
 |
Pat Farrell
Rancher
Joined: Aug 11, 2007
Posts: 4422
|
|
|
most of the linux gui shells, gnome or kde, have a 'trash' folder, so you can 'undelete' from it. The shell 'rm' commands are pretty close to final. That's why God invented SVN
|
 |
 |
|
|
subject: Recovery of file after removing it?
|
|
|