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.
假设有一个文件夹结构:
some_dir/a.txt some_dir/b.txt some_dir/c/d.txt some_dir/.e/f.txt some_dir/.e/g.txt
如何获得以下的校验和(例如 md5sum 或 sha256):
some_dir/a.txt some_dir/b.txt some_dir/c/d.txt
同时排除some_dir/.e/校验和计算中的所有内容?
some_dir/.e/
这可能是您正在寻找的:
find some_dir -type f \! -path '*/.*' -exec md5sum {} +