Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Can anyone help me out in getting back a deleted file in linux. Instead of giving this command " rm -rvf *~ ", I gave " rm -rvf * ".

Is there any way to get all files back ??

share|improve this question
    
2  
Backup, Backup, Backup!!! –  Chris S Jul 2 '10 at 17:25

2 Answers 2

The usual response is "backup?"

I would try my RIP (rescue is possible) linux disc, boot from it, then run testdisk. There's a buried menu item that lets you look at the filesystem and it may recover some of the files (it's meant to recover damaged or deleted partitions).

The important thing is to take the system offline as soon as possible, since the more activity there is on the drive the greater the chance you're going to overwrite what could be recovered.

Depending on how important the data is, you could try googling file recovery with your filesystem type and there are guides for pulling data using sector counts and such, and there are other utilities that might help. If it's REALLY important you can lay out a couple hundred to a couple thousand dollars to a company that will recover the data.

The absolute best thing to do is recover from a backup. If this was a home system, you might be better off putting this question to SuperUser, as the answers are probably already there.

share|improve this answer

If it's ext2 (unlikely these days) you've got an undelete tool.

If it's ext3, you can try this approach: http://www.xs4all.nl/~carlo17/howto/undelete_ext3.html

Other filesystems?

Getting "all files back" is going to be a bit of work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.