Last active
December 17, 2015 05:39
-
-
Save ETiV/5559407 to your computer and use it in GitHub Desktop.
要点: find 的 -exec 可以出现很多次. 并依出现次序执行命令
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd "$1" | |
#find * -type f -print0 | xargs -0 $DIR/digest.sh | |
find * -name "*" -type f -exec stat --printf='%s ' '{}' \; -exec md5sum '{}' \; | |
cd - > /dev/null | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
usage:
./build_md5.sh ${DIR_NAME}