如何在 find 命令中删除两个目录

How to prune out two directories in find command

我有以下命令:

$ find /mnt/DCS_01 /mnt/DCS_02  \
  -name Transit -prune -o .Trashes -prune -o -type f

我正在尝试删除 Transit.Trashes 目录,但在语法方面遇到了一些困难。这里的正确命令是什么?

您可以使用括号指定多个参数 --

$ find /mnt/DCS_01 /mnt/DCS_02  \
  \( -name Transit -o -name .Trashes \) -prune -o -type f