jav*_*web 2 command-line directory diff duplicate
设想:
我尝试使用meldGUI,但这需要无尽的时间才能完成这些结构。
我尝试使用diff --brief --report-identical-files folder1 folder2,但基本上报告了所有内容,它甚至不包括文件夹,所以我什至不能| grep identical。
我使用了错误的工具吗?还是有什么我没有学到的技巧diff --help?或者我做错了什么?
谢谢
我会使用一个简单的find:
find "/path/to/main1" "/path/to/main2" -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | sort | uniq -d
Run Code Online (Sandbox Code Playgroud)
或者使其以零终止以防止换行符出现问题:
find "/path/to/main1" "/path/to/main2" -mindepth 1 -maxdepth 1 -type d -printf '%f\0' | sort -z | uniq -zd | xargs -0
Run Code Online (Sandbox Code Playgroud)