
The rm command often instructs the system to mark the file's inode and data blocks as unused. Because of this, when we use the rm command, the filesystem deletes the references to the files and informs the operating system that the storage blocks have been released. It means that the file's actual data is still present on the disk. The system only removes the link to the file when we use the rm command. The system then uses these links to locate files on the disk. The system establishes a link to the file when we create it. Let's quickly review the Linux filesystem's operation before moving to where the files are stored. For example,įor macOS X 10.10 - macOS 13 Where Do Files Go When Running the RM Command

You can use several options with the rm command to modify its behavior. Removing directories: If you want to remove one or more than one directory, you have to use " -d". Rm filename1 filename2 filename3 filename 4 You can specify multiple files to be deleted by separating them with a space.ĭeleting single file: If you want to delete a single file, you have to use the “rm” command followed by the file's name as an argument.ĭeleting multiple files: You just need to pass the filenames as arguments separated by space if you want to delete multiple files. Here, " file" is the name of the file that you want to delete. The basic syntax for using the rm command is: By separating the names of the files with a space, you can also remove multiple files at once.

The path to the file must be specified if it is in a separate directory.

You can delete a file using the rm command by typing the command and the file's name in the Terminal. It would be best if you opened a Terminal on your Linux system to use the rm command. As a result, it's essential to use caution when using it to prevent unintentionally destroying important files. I would really appreciate if some expert can really help me out to get the data recovered.Note: The rm command deletes files without asking for approval. Stackoverflow post gave me some hope but it did not have detailed instructions. This data contains pictures of my grandmother who passed away in October last year, and I literally cried when I found out 750 GB drive is gone. I just need some expert's guidance so I don't loose anything at all. After doing diskclean, I see a single partition of 932 GB. I did a format of the Windows drive with 250 GB and when i tried installing Windows I could not due to it being a GPT type.

part-clean, that recovery is still possible and stumbled upon this place.Ĭan someone please suggest how can I recover the data? Prior configuration was 2 partition (250 GB with Windows installed, 750 GB with data - which is the one I am concerned about). Though I believed it would do it for a partition only, it did it for the entire disk. While trying to install Windows on a GPT system I accidently did a disk clean.
