精品丰满熟女一区二区三区_五月天亚洲欧美综合网_亚洲青青青在线观看_国产一区二区精选

  • <menu id="29e66"></menu>

    <bdo id="29e66"><mark id="29e66"><legend id="29e66"></legend></mark></bdo>

  • <pre id="29e66"><tt id="29e66"><rt id="29e66"></rt></tt></pre>

      <label id="29e66"></label><address id="29e66"><mark id="29e66"><strike id="29e66"></strike></mark></address>
      學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 操作系統(tǒng) > Linux教程 > linux中rmdir命令使用詳解

      linux中rmdir命令使用詳解

      時(shí)間: 志藝942 分享

      linux中rmdir命令使用詳解

        rmdir命令。rmdir是常用的命令,該命令的功能是刪除空目錄,一個(gè)目錄被刪除之前必須是空的。接下來(lái)是小編為大家收集的linux中rmdir命令使用詳解,希望能幫到大家。

        linux中rmdir命令使用詳解

        1.命令格式:

        rmdir [選項(xiàng)]... 目錄...

        2.命令功能:

        該命令從一個(gè)目錄中刪除一個(gè)或多個(gè)子目錄項(xiàng),刪除某目錄時(shí)也必須具有對(duì)父目錄的寫權(quán)限。

        3.命令參數(shù):

        - p 遞歸刪除目錄dirname,當(dāng)子目錄刪除后其父目錄為空時(shí),也一同被刪除。如果整個(gè)路徑被刪除或者由于某種原因保留部分路徑,則系統(tǒng)在標(biāo)準(zhǔn)輸出上顯示相應(yīng)的信息。

        -v, --verbose 顯示指令執(zhí)行過(guò)程

        4.命令實(shí)例:

        實(shí)例一:rmdir 不能刪除非空目錄

        命令:

        rmdir doc

        輸出:

        [root@localhost scf]# tree

        .

        |-- bin

        |-- doc

        | |-- info

        | `-- product

        |-- lib

        |-- logs

        | |-- info

        | `-- product

        `-- service

        `-- deploy

        |-- info

        `-- product

        12 directories, 0 files

        [root@localhost scf]# rmdir doc

        rmdir: doc: 目錄非空

        [root@localhost scf]# rmdir doc/info

        [root@localhost scf]# rmdir doc/product

        [root@localhost scf]# tree

        .

        |-- bin

        |-- doc

        |-- lib

        |-- logs

        | |-- info

        | `-- product

        `-- service

        `-- deploy

        |-- info

        `-- product

        10 directories, 0 files

        說(shuō)明:

        rmdir 目錄名 命令不能直接刪除非空目錄

        實(shí)例2:rmdir -p 當(dāng)子目錄被刪除后使它也成為空目錄的話,則順便一并刪除

        命令:

        rmdir -p logs

        輸出:

        [root@localhost scf]# tree

        .

        |-- bin

        |-- doc

        |-- lib

        |-- logs

        | `-- product

        `-- service

        `-- deploy

        |-- info

        `-- product

        10 directories, 0 files

        [root@localhost scf]# rmdir -p logs

        rmdir: logs: 目錄非空

        [root@localhost scf]# tree

        .

        |-- bin

        |-- doc

        |-- lib

        |-- logs

        | `-- product

        `-- service

        `-- deploy

        |-- info

        `-- product

        9 directories, 0 files

        [root@localhost scf]# rmdir -p logs/product

        [root@localhost scf]# tree

        .

        |-- bin

        |-- doc

        |-- lib

        `-- service

        `-- deploy

        |-- info

        `-- product

        7 directories, 0 files

        
      看了“linux中rmdir命令使用詳解”還想看:

      1.Linux命令rmdir和rm有什么不同

      2.Linux命令和命令行詳解

      3.mkdir命令怎么使用

      4.Linux系統(tǒng)怎么徹底刪除文件

      5.Linux中常用操作命令介紹

      2888955