0

マンページでは、次のオプションのみが提供されます。

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

ファイル ツリー内のすべての空のディレクトリを再帰的に削除するには、 findorをパイプする方法を教えてください。ls

4

1 に答える 1

3
find . -type d -empty -delete

すべての破壊的なコマンドと同様に、print と sanity-deleteは完全なコマンドを実行する前にターゲットをチェックします ( を省略します)。

于 2013-06-24T18:21:36.760 に答える