Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Rm (Unix)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Use == By default, <code>rm</code> removes specified files, but does not remove a directory.<ref>{{Cite web|url=https://man7.org/linux/man-pages/man1/rm.1.html|title=rm(1) - Linux manual page|website=man7.org}}</ref> For example, the following removes the file named '''[[Foobar|foo]]''' <syntaxhighlight lang="bash"> $ rm foo </syntaxhighlight> But that command fails if '''foo''' is a directory. To delete directory '''foo''': <syntaxhighlight lang="bash"> $ rm -r foo </syntaxhighlight> The command is often used with [[xargs]] to supply a list of files: <syntaxhighlight lang="bash"> $ xargs rm < filelist </syntaxhighlight> To remove all [[Portable Network Graphics|PNG images]] in all directories below the current one: <syntaxhighlight lang="bash"> $ find . -name '*.png' -exec rm {} + </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)