命令简介:

该命令用用来删除空目录,如果目录非空,则会出现错误。可以使用rm删除目录中的文件后,使用rmdir删除目录。也可以使用rm -rf替代rmdir命令。这是一个非常简单的命令。

 

命令语法:

rmdir [OPTION]... DIRECTORY...

 

命令参数:

参数

长参数

描叙

--ignore-fail-on-non-empty

忽略任何应目录里面有数据文件而造成的错误

-p

--parents

递归删除目录

-v

--verbose

显示命令执行的详细信息

--help

显示命令在线帮助

--version

显示命令版本信息

 

 

使用示例:

 

1: 查看rmdir命令的帮助信息

[root@DB-Server ~]# rmdir --help
Usage: rmdir [OPTION]... DIRECTORY...
Remove the DIRECTORY(ies), if they are empty.
 
      --ignore-fail-on-non-empty
                  ignore each failure that is solely because a directory
                  is non-empty
  -p, --parents   Remove DIRECTORY and its ancestors.  E.g., `rmdir -p a/b/c' is
                  similar to `rmdir a/b/c a/b a'.
  -v, --verbose   output a diagnostic for every directory processed
      --help     display this help and exit
      --version  output version information and exit
 
Report bugs to <bug-coreutils@gnu.org>.

相关文章:

  • 2021-06-15
  • 2021-09-05
  • 2021-11-08
  • 2022-01-27
  • 2022-12-23
  • 2021-10-16
  • 2021-12-05
猜你喜欢
  • 2021-11-29
  • 2021-06-15
  • 2021-11-21
  • 2021-09-30
  • 2022-02-20
  • 2021-12-18
  • 2022-01-30
相关资源
相似解决方案