【问题标题】:How do I remove a directory in linux that has files and other directories as content [closed]如何删除linux中包含文件和其他目录作为内容的目录[关闭]
【发布时间】:2021-05-06 06:18:31
【问题描述】:

是否有特定的命令或标志来删除特定目录中的所有目录和文件?

当我使用rm -r 时,我能够删除在一个目录中找到的所有文件,但我永远无法删除在该目录中找到的目录。

【问题讨论】:

    标签: linux shell command-line centos


    【解决方案1】:

    添加-f 选项:

    rm -rf dirToNuke
    

    警告:这是一个核命令。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-21
      • 2011-03-21
      • 1970-01-01
      • 2023-01-04
      相关资源
      最近更新 更多