Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想查找并删除所有额外的 *.srt 文件。如果在视频目录中有一个 *.en.srt 文件,那么我想 rm 那个文件,如果没有,那就离开它。
所以我想出了这个:
find /share/CACHEDEV4_DATA/Movies -name "*.srt" ! -name "*.en.srt" -type f -exec rm -v {} \;
会找到并删除它们,但我不知道如何保留那些单独的。
还rm *.srt不够吗?
rm *.srt