现在我的方法是:
查找包含 a.txt 的目录
find -type f -iname "a.txt" | sed -r 's|/[^/]+$||' > a_paths.txt
Run Code Online (Sandbox Code Playgroud)查找包含 b.txt 的目录
find -type f -iname b.txt | sed -r 's|/[^/]+$||' > b_paths.txt
Run Code Online (Sandbox Code Playgroud)打印差异
comm -23 <(sort a_paths.txt ) <(sort b_paths.txt)
Run Code Online (Sandbox Code Playgroud)单线有什么有效的方法find吗?