rm
rm, short for remove, is a shell command for removing files (which includes special files such as directories) from the file system. The command may not actually delete a file (release its storage for reuse) since it only unlinks it – removes a hard link to a file via the unlink() system call. If a file has multiple links and less than all are removed, then the file remains in the file system; accessible via its other links. When a file's only link is removed, then the file is deleted – releasing its storage space for other use.[1]
- GNU Coreutils [EN] @ Homebrew Formula
Documentation
- rm [EN] @ GNU Coreutils Manual
Syntax
rm [PARAMETER ...] [FILE/DIRECTORY ...]
Parameters
References
- ↑ Wikipedia contributors. "rm (Unix)." Wikipedia. https://en.wikipedia.org/wiki/Rm_(Unix) (accessed 19.08.2025)