Primary
rm ⚬ˢʰ|Definition|1st|20260523112705-00-⌔
rm (Unix)
rm, short for r e m ove, 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.Generally, a deleted file’s former storage space still contains the file’s data until it is overwritten with another file’s content. The data is not accessible via normal file operations but can be recovered via specialized tools. Since this is considered a security risk in some contexts, a hardened version of
cpmay wipe the file’s storage area when the file is deleted. Commands such as shred and srm specifically provide data wiping.Since
rmdoes not provide a fallback to recover a file such as a recycle bin, its use involves the risk of accidentally losing information.1 Users tend to wrap calls tormin safety mechanisms to limit accidental deletion. There are undelete utilities that attempts to reconstruct the index and can bring the file back if its storage was not reused.Originally, developed for Unix, today it is also available on Unix-like and non Unix-like systems, KolibriOS,2 IBM i,3 EFI shell.4 and Windows (via UnxUtils).5 The
delcommand provides a similar capability in MS-DOS, OS/2, and Command Prompt.Like
rm, theunlinkcommand also removes (unlinks) files, but only one file at a time.Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original Footnotes
“Unix - Frequently Asked Questions (3/7) [Frequent posting]Section - How do I”undelete”a file?”. www.faqs.org. Archived from the original on 2012-10-10. Retrieved 2010-08-03. ↩
“Shell - KolibriOS wiki”. wiki.kolibrios.org. Archived from the original on 2019-02-11. Retrieved 2019-08-11. ↩
IBM. “IBM System i Version 7.2 Programming Qshell” (PDF). IBM. Archived (PDF) from the original on 2020-09-18. Retrieved 2020-09-05. ↩
“EFI Shells and Scripting”. Intel. Archived from the original on 2013-09-27. Retrieved 2013-09-25. ↩
“Native Win32 ports of some GNU utilities”. unxutils.sourceforge.net. Archived from the original on 2006-02-09. Retrieved 2025-08-11. ↩
rm ⚬ˢʰ|docu|1st|20251021001049-00-◊
rm(1) - Linux manual page
Link to original
(echo:: @ ᯤ)
Secondary
• • •