国产宅男网站在线|亚洲A级性爱免费视频|亚洲中精品级在线|午夜福利AA毛

  • <dd id="gf5jf"><th id="gf5jf"></th></dd>

    <cite id="gf5jf"><label id="gf5jf"></label></cite>
  • <div id="gf5jf"><listing id="gf5jf"></listing></div>
    學(xué)習(xí)啦>學(xué)習(xí)電腦>操作系統(tǒng)>Linux教程>

    linux的rmdir命令

    時(shí)間: 佳洲1085 分享

      Linux下的rmdir命令是用來刪除空目錄的。下面由學(xué)習(xí)啦小編為大家整理了linux下rmdir命令的相關(guān)知識(shí),希望對大家有幫助!

      linux的rmdir命令詳解

      該命令用用來刪除空目錄,如果目錄非空,則會(huì)出現(xiàn)錯(cuò)誤??梢允褂胷m刪除目錄中的文件后,使用rmdir刪除目錄。也可以使用rm -rf替代rmdir命令。這是一個(gè)非常簡單的命令。

      命令語法:

      rmdir [OPTION]... DIRECTORY...

      命令參數(shù):

    參數(shù)

    長參數(shù)

    描敘

    --ignore-fail-on-non-empty

    忽略任何應(yīng)目錄里面有數(shù)據(jù)文件而造成的錯(cuò)誤

    -p

    --parents

    遞歸刪除目錄

    -v

    --verbose

    顯示命令執(zhí)行的詳細(xì)信息

    --help

    顯示命令在線幫助

    --version

    顯示命令版本信息

      linux的rmdir命令使用示例

      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>.

      也可以使用下面命令查看rmdir文檔信息

      [root@DB-Server ~]# man rmdir

      2: 使用rmdir刪除空目錄

      如果目錄非空,則會(huì)出現(xiàn)錯(cuò)誤信息。

      [root@DB-Server ~]# ls /root/kerry/

      file1

      [root@DB-Server ~]# rmdir kerry

      rmdir: kerry: Directory not empty

      [root@DB-Server ~]# rm -f /root/kerry/*

      [root@DB-Server ~]# rmdir kerry

      3:顯示命令執(zhí)行時(shí)的詳細(xì)信息

      [root@DB-Server ~]# mkdir test1 test2 test3

      [root@DB-Server ~]# ls

      anaconda-ks.cfg Desktop install.log install.log.syslog test1 test2 test3

      [root@DB-Server ~]# rmdir -v test1 test2 test3

      rmdir: removing directory, test1

      rmdir: removing directory, test2

      rmdir: removing directory, test3

      4:遞歸刪除目錄,如下所示,首先創(chuàng)建目錄kerry,在kerry目錄下創(chuàng)建空目錄tmp,接下來空目錄test

      [root@DB-Server ~]# mkdir -p kerry/tmp/test

      [root@DB-Server ~]# tree kerry

      kerry

      `-- tmp

      `-- test

      2 directories, 0 files

      [root@DB-Server ~]# rmdir -p kerry/tmp/test

      5:忽略任何應(yīng)目錄里面有數(shù)據(jù)文件而造成的錯(cuò)誤

      [root@DB-Server ~]# mkdir kerry

      [root@DB-Server ~]# cd kerry

      [root@DB-Server kerry]# touch file1

      [root@DB-Server kerry]# cd ..

      [root@DB-Server ~]# rmdir --ignore-fail-on-non-empty kerry/

    linux的rmdir命令

    Linux下的rmdir命令是用來刪除空目錄的。下面由學(xué)習(xí)啦小編為大家整理了linux下rmdir命令的相關(guān)知識(shí),希望對大家有幫助! linux的rmdir命令詳解 該命令用用來刪除空目錄,如果目錄非空,則會(huì)出現(xiàn)錯(cuò)誤??梢允褂胷m刪除目錄中的文件后,使用
    推薦度:
    點(diǎn)擊下載文檔文檔為doc格式

    精選文章

    • linux的rm-rf命令
      linux的rm-rf命令

      Linux下的rm-rf命令是個(gè)刪除文件命令。下面由學(xué)習(xí)啦小編為大家整理了linux下rm-rf命令的相關(guān)知識(shí),希望對大家有幫助! linux的rm-rf命令詳解 rm -rf * 這個(gè)命令的

    • linux的reboot命令
      linux的reboot命令

      Linux下的reboot命令是用來重啟linux系統(tǒng)的。下面由學(xué)習(xí)啦小編為大家整理了linux下resboot命令的相關(guān)知識(shí),希望對大家有幫助! linux的reboot命令詳解 命令簡介:

    • linux的resize2fs命令
      linux的resize2fs命令

      Linux下的resize2fs命令被用來增大或收縮未加載的文件系統(tǒng)的大

    • linux的rename命令
      linux的rename命令

      Linux下rename命令主要是批量重命名文件。下面由學(xué)習(xí)啦小編為大家整理了linux下rename命令的相關(guān)知識(shí),希望對大家有幫助! linux的rename命令詳解 rename命令用字

    3630484