I accidentally deleted a file by running:
rm -rf ./Desktop/myScript.sh
I think it's possible to recover the file, because the
rm command removes temporarily. How can I recover the deleted file on Mac OSX?
MacOS is a Unix OS and
Strictly speaking (as @ire_and_curses points out) a
The MacOS also has a secure remove command (
[ I should hasten to add that even if you over-write a disk multiple times, there are ways to read what was written a dozen or more times before. To properly sanitize a disk for disposal really requires an acid bath, a big hammer and a shredder. ]
Opening a file and immediately
In Unix and Linux (of which the MacOS is a branded Unix), an
Depending on your content, but you can use different 3rd party softwares to do that, e.g.:
and many more.
You can find more apps by typing 'data recovery' in App Store.
More advanced way is to boot your OSX in recovery mode (or umount your partition if you can) and look for it manually (if you remember some specific text from your script).
I deleted so many files from my Macbook, but I found some of them were important, so I wanted get them back. But it recovers so many files, so you have to spend time on selecting the files that you want to recover.
So you can try:
or find more and more on Google.