|
Article on other languages:
|
rm (short for remove) is a Unix command used to delete files from a filesystem.
OptionsCommon options that rm accepts include:
rm is often aliased to "rm -i" so as to avoid accidental deletion of files. If a user still wishes to delete a large number of files without confirmation, they can manually cancel out the -i argument by adding the -f option (as the option specified later on the expanded command line "rm -i -f" takes precedence). rm -rf (variously, rm -rf /, rm -rf *, and others) is frequently used in jokes and anecdotes about Unix disasters. The rm -rf / variant of the command, if run by a superuser, would cause the contents of every writable mounted filesystem on the computer to be deleted. rm is often used in conjunction with xargs to supply a list of files to delete: xargs rm < filelist When rm is used on a symbolic link, it deletes the link, but does not affect the target of the link. PermissionsUsually, on most filesystems, deleting a file requires write permission on the parent directory (and execute permission, in order to enter the directory in the first place). (Note that, confusingly for beginners, permissions on the file itself are irrelevant.) To delete a directory (with If a file resides in a directory with the sticky bit set, then deleting the file requires one to be the owner of the file. TriviaSun introduced " ReferencesExternal links
|
||||||||||||||||||||||||||||||||||||||||||
This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.
Mercedes Car
This site monitored by SitePinger.net