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.
如何使用命令find在 bash 脚本中通过哈希 sha1搜索文件?
虽然find没有选项来检查文件的 SHA1,但您可以sha1sum为它找到的每个文件执行 find ,然后使用它grep来选择您要查找的校验和。例如:
find
sha1sum
grep
find . -type f -exec sha1sum '{}' ';' | grep 7ceeeeaba7d7e22301dfc5d6707f0c7f3eeb55a8