rmdir

删除目录,此命令仅在文件夹为空时才有效

语法

  rmdir [options]... folder(s)...

选项(options)

  --ignore-fail-on-non-empty
              忽略仅仅因为目录非空而导致的每个失败。

-p, --parents 如果清空,删除显式的父目录

  --verbose   为处理的每个目录输出诊断结果

  --help      显示帮助和退出

  --version   输出版本信息并退出

例子

删除一个空目录

$ rmdir myfolder

Before removing directories with a wildcard, it’s wise to list them first:

$ ls -d britney*/

rmdir 命令实例:

linux命令:rmdir / backup / all all / backup / rmdir rmdir / backup / allrootopen.com
linux命令:rmdir / backup / all all / backup / rmdir rmdir / backup / allrootopen.com
2018-09-11 09:55:30

linux命令:rmdir **/*(/^F) **/*(/^F) rmdir rmdir **/*(/^F)rootopen.com
linux命令:rmdir **/*(/^F) **/*(/^F) rmdir rmdir **/*(/^F)rootopen.com
2018-03-11 12:02:48

linux命令:rmdir --ignore-fail-on-non-empty -p **/*(/^F) **/*(/^F) -p --ignore-fail-on-non-empty rmdir rmdir --ignore-fail-on-non-empty -p **/*(/^F)rootopen.com
linux命令:rmdir --ignore-fail-on-non-empty -p **/*(/^F) **/*(/^F) -p --ignore-fail-on-non-empty rmdir rmdir --ignore-fail-on-non-empty -p **/*(/^F)rootopen.com
2018-01-05 22:35:48

linux命令:rmdir -p new/directory/path new/directory/path -p rmdir rmdir -p new/directory/pathrootopen.com
linux命令:rmdir -p new/directory/path new/directory/path -p rmdir rmdir -p new/directory/pathrootopen.com
2018-02-10 20:26:48

Linux的Bash命令行(A-Z排序)