Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just typed rm * in the wrong directory by mistake. I had the wrong terminal window highlighted. What are my options?

share|improve this question

migrated from stackoverflow.com Jan 20 '13 at 7:18

This question came from our site for professional and enthusiast programmers.

Just restore from your latest back-up - that's the whole point of having a back-up strategy, after all. –  Paul R Jan 19 '13 at 21:34
I have a backup, but I will lose about 3 hours of tight deadline work. –  Jon Crowell Jan 19 '13 at 21:35
this tool has worked for me in the past: extundelete.sourceforge.net –  thang Jan 19 '13 at 21:47
If there was activity on the machine (writing files, particularly), the space the deleted files used to occupy is probably already recycled. Chalk it up to "Unix learning." My condolences. –  vonbrand Jan 23 '13 at 18:17
Now it's on SuperUser, can be closed as a dupe: superuser.com/questions/32355/undo-linuxs-rm?rq=1 –  therefromhere Feb 16 '13 at 5:37
show 1 more comment

2 Answers 2

What you can do is re-do the three hours of work, and then think about aliasing your rm command to a script which works like rm but stages deletes through a trash bin directory which must be explicitly emptied before the files are really gone.

share|improve this answer
add comment

Do as Paul -R Says, I think if i remember correctly, if write operation has occurred then its not possible to UNDELETE the item....

Maybe you can find more information here.... http://www.computerhope.com/undelete.htm

share|improve this answer
add comment

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.