本帖最后由 古月不傲 于 2020-10-9 09:40 编辑
[Asm] 纯文本查看 复制代码 name
rm - remove files or directories.(删除文件或目录)
synopsis
rm [option]... [file]...
description
This manual page documents the GNU version of rm. rm removes each specified file.
该页记录rm的GNU版本。rm删除每个指定的文件
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 --resursive are given, then rm prompts the user for whether to proceed
with entire operation. If the response is not affirmative, the entire command is aborted.
如果给定-I or --interactive=once, 并且有超过三个文件, 也给定了 -r、-R 或--resursive,
rm就提示用户是否继续执行全部的操作。
Otherwise, if a file is unwritable, standard input is terminal, and the -f or --force
option is not given, or the -i or --interative=always option is given, rm prompts
the user for whether to remove the file. If the response is not affirmative, the file
is skipped.
另外,如果一个文件是不可写的,标准输入是终端,并且没有给定-f or --force选项,
rm提示用户是否删除这个文件。如果响应不是肯定的,该文件被跳过。
options
Remove (unlink) the FILE(s).
-f, --force
ignore nonexistent files and arguments, nerver prompt.
无视不存在的文件和参数,从不提示。
-i
prompt before every removal.
每个删除前会提示
-I
prompt once before removing more than three files, or when removing recursively;
less intrusive than -i, while still giving protection against most mistakes.
删除三个以上的文件前提示一次,或递归删除时。相较于-i,让人没那么反感(
相当于--interactive=once),同时还能给予保护防止大部分的错误。
--interactive[=when]
prompt according to when:never, once(-I), or always(-i);
without when, prompt always.
根据情况提示:=nerver(不提示直接删除), =once(-I是默认提示一次), =always(-i默认每删除
一个都提示), 不加=...的话,相当于always.
--one-file-system
when removing a hierarchy recursively, skip any directory that is on a file system
different from that of the corresponding command line argument.
当递归删除一个层级时,它会从相应命令行参数的不同文件系统上跳过任何目录。
--no-preserve-root
do not treat '/' specially
不特殊对待根目录(不要轻易尝试)
--preserve-root
do not remove '/' (default)
不删除根目录(默认不删除)
-r, -R, --recursive
remove directories and their contents recursively.
删除目录并且递归删除它们的内容。
-d, --dir
remove empty directories.
删除空的目录
-v, --verbose
explain what is being done.
阐述执行过程。
--help
display this help and exit.
显示帮助并退出。
--version
output version information and exit.
输出版本信息并退出。
By default, rm does not remove directories. Use the --recursive(-r or -R) option to remove
each listed directory, too, along with all of its contents.
默认情况下,rm不删除目录。使用--recursive(-r or -R)删除每个列出的目录,
也一并删除目录的所有内容。
|