info > rm

```html

πŸ“‹ NAME

rm β€” remove files or directories

πŸš€ Quick Reference

Use CaseCommandDescription
Remove a single filerm file.txtDelete the specified file (prompts if unwritable)
Remove multiple filesrm file1.txt file2.txtDelete multiple files
Force remove without promptrm -f file.txtIgnore nonexistent files and never prompt
Recursively remove a directoryrm -rf dir/Remove directory and all contents (⚠️ dangerous)
Interactive removalrm -i *.txtPrompt before each deletion
Remove empty directoryrm -d empty_dir/Remove only if directory is empty
Remove file named -frm -- -fUse -- to separate options from non‑option arguments

πŸ“– SYNOPSIS

rm [OPTION]... [FILE]...

πŸ“ DESCRIPTION

rm removes each given FILE. By default, it does not remove directories.

If the -I or --interactive=once option is given, and there are more than three files or the -r, -R, or --recursive are given, then rm prompts the user for whether to proceed with the entire operation. If the response is not affirmative, the entire command is aborted.

Otherwise, if a file is unwritable, standard input is a terminal, and the -f or --force option is not given, or the -i or --interactive=always option is given, rm prompts the user for whether to remove the file. If the response is not affirmative, the file is skipped.

Any attempt to remove a file whose last file name component is . or .. is rejected without any prompting, as mandated by POSIX.

⚠️ Warning: If you use rm to remove a file, it is usually possible to recover the contents of that file. If you want more assurance that the contents are unrecoverable, consider using shred.

βš™οΈ OPTIONS

The program accepts the following options. Also see Common options.

πŸ“š EXAMPLES

One common question is how to remove files whose names begin with a -. GNU rm, like every program that uses the getopt function to parse its arguments, lets you use the -- option to indicate that all following arguments are non-options. To remove a file called -f in the current directory, you could type either:

rm -- -f

or:

rm ./-f

The Unix rm program's use of a single - for this purpose predates the development of the getopt standard syntax.

πŸ”— SEE ALSO

πŸšͺ EXIT STATUS

An exit status of zero indicates success, and a nonzero value indicates failure.

```
rm
πŸ“‹ NAME πŸš€ Quick Reference πŸ“– SYNOPSIS πŸ“ DESCRIPTION βš™οΈ OPTIONS πŸ“š EXAMPLES πŸ”— SEE ALSO πŸšͺ EXIT STATUS

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-31 10:07 @216.73.217.152
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^