Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
Backup, Backup, Backup!!! – Chris S Jul 2 '10 at 17:25

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:

Other filesystems?

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

share|improve this answer

Your Answer


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