-5

How we can undo rm -rf command ? For example, I have Application folder. And I have remove it by

rm -rf Application

But it was my mistake and want to recovery or want that Application Folder. But its not in Trash folder. What should I do now ? Is there any command undo rm -rf

4
  • 4
    No, this is why people new to linux should not use -rf, but -ri.
    – user140044
    Jan 22, 2014 at 23:55
  • 3
    Could try something like this... no guarantees though. Keep good backups.
    – mpontillo
    Jan 23, 2014 at 0:13
  • 1
    Build a time machine, or restore from your backup. Jan 23, 2014 at 0:28
  • Welcome to serverfault. Crossposting would not have been required, since this has already been asked on SU. Jan 23, 2014 at 0:32

1 Answer 1

12

With your backup tapes.
Unix does not protect you from doing bad things. You specified the recursive & force flags, it assumed you knew what that would mean, and did what you asked.

If the data is important power the machine off immediately (seriously, rip the plug out of the wall before the operating system writes something in that "free" space and destroys your data) and contact a data retrieval company.
(The fact that you're asking this question indicates to me that you lack the experience required to attempt recovery yourself - I'm not going to send you down that particular rabbit hole.)

If the data is not important, try a utility like unrm.

Not the answer you're looking for? Browse other questions tagged .