0

I deleted some files via sudo rm -rf ~/.Trash/* - unfortunately I accidentally moved a folder from the Desktop into there and can't seem to recover it.

I only use this command now and then, when I need to; but how can I recover these files? I know it's a powerful command, but I cocked up this one, but at least I didn't delete system files... only a few personal JPG and PDF files.

I tried two data recovery utilities but it didn't seem to find the folder or its contents... why?

I have one backup of the folder with some of the contents on stored on an external HD, but that's not as up-to-date; the file was deleted 11 Apr 2014 - that's today.

How can I fix this?

  • As far I know the rm are final. – Ruskes Apr 11 '14 at 23:23
  • @Buscar Why would they be more final than emptying the Trash? – Édouard Apr 11 '14 at 23:28
  • Which recovery utilities have you tried? – Édouard Apr 11 '14 at 23:28
  • 1
    When you Delete a file or Empty the Trash all it happens is the file header is deleted, but the content is still there, but it is considered free space so it will be eventually overwritten. However if you use the Secure Empty the Trash or use RM those also delete the body, leaving no trace of the file. – Ruskes Apr 11 '14 at 23:49
1

Please stop writing to your hard drive this instant. That means turning it off if your system is running from said hard drive. The more you write on the HD, the more likely you are to write over the data you want to recover. And a running OS is writing on the HD.

Once you’ve done that, I can’t think of any reason why there would be any difference between files you’ve erased by emptying the Trash and files you’ve rmed1.

So the best solution you have is:

  1. Boot from another disk.
  2. Run a recovery utility such as Data Rescue.

1. By the way, why rm the Trash?

You must log in to answer this question.

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