• Post Reply Bookmark Topic Watch Topic
  • New Topic

Restoring Files after removing using "rm" command.  RSS feed

 
rajesh techno
Greenhorn
Posts: 4
Java Netbeans IDE Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can we get back the files which we removed it from a particular directory in unix using command "rm"........ i hav removed server.log file from a directory while i was taking back up of it...by mistake....now i want that file back in the directory... ca anyone suggest me in steps to be performed to hav the file back....
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me google that for you: linux undelete
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I never knew that one could undelete something that got removed by rm command.
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, rm (and del in Windows) doesn't remove or delete anything. Well, it does, but the only thing it deletes is the reference to the file from the directory. So the file contents are still on disk, it is just that you cannot access them. Special tools that read disk sectors can find such files and add them back into a directory (that is, 'undelete' them) so that you can access them. Of course, if the file sectors get overwritten with other file contents then they are gone (though there are tools that can read the residual magnetic imprint of such overwritten files and reconstruct them, which is why there are security-grade delete tools available that overwrite a file's sectors multiple times.)
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a shell utility program that we can place inside bin to execute the undelete command?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!