Macos – Can files deleted with rm -rf be recovered

macosrmterminalUbuntuunix

When I delete folders or files in through osx terminal using the rm -rf, where do they go? I heard that some say they are deleted directly, but some also say it only "remove the link to the file making it unable to be found or accessed without special tools" ( Where do files and directories go when I run 'rm -rf folder_or_file_name' in Ubuntu 10.04? ).

Someone said something about ext3 being able to save rm-ed files in ubuntu but what about mac?

Best Answer

Files deleted using rm are not easily recovered and, although the contents are not overwritten by the rm command the space they occupy is marked as free space and can be used for new files or for additional content added to existing files.

As soon as the rmcommand completes, the system is no longer keeping any record of the location of the data for that file.

There are file-recovery tools you can use, but that is a separate question. If you don't have a backup - stop using the computer and look for file-recovery tools. Be prepared for total loss though as recovery is not guaranteed.

See

Related Question