How do I recover deleted files?
I have deleted a whole directory using the 'rm -r -f' and it contained important files, images, and scripts. Is there anyway I could recover the deleted files quickly?
Thank you! |
Restore from backup....................
Don't have a backup then you learned a valuable lesson the hard way. Everybody makes mistakes, everything made by man breaks or fails. |
When you deleate something, doesn't the hard drive(or Filesystem) just mark that spot as writeable?(There isn't a file in that spot) So technicaly you could use a program to try to recovor it if I am right. I don't know of any specific programs tho.
|
It depends on the filesystem. If you're using a non-jounralled filesystem like vfat or ext2 then there is some hope (and there even exists a nice ext2 undelete program). If you're using ext3, because of the way the jourmal works (zeros out the inode entry), you're more or less out of luck. The data may still be on the disk blocks, so it's possible that some non-OS dependent disk scanning tools could find it, but it's going to be hit and miss. If the data is critical, a professional disk recovery firm would probably be happy to help, but it will cost you.
Remember, in Linux, rm means rm. [edit to add] If you're using ReiserFS, there may be some hope, as expressed by this howto. I've never tried anything like it, though, so I can't vouch for any of the info. |
I have changed the title slightly to make it less, ummm, emotional.
And welcome to LQ :D |
it is wise to make an alias in ~/.bashrc file to ask you first if you want to remove the file or not
Code:
alias rm="rm -i" http://wiki.linuxquestions.org/wiki/Alias |
All times are GMT -5. The time now is 03:04 PM. |