对指定目录下扩展名为.asset,.manifest,.wem,.bnk的文件计算md5并汇总到指定文件中。
md5文件内容格式: 文件名,md5
类似:
Audio_Knives_Skill_1_43_9E69E797.wem,bc87ec6bce97e93824a0fdfa39ebafaf Audio_Knives_Skill_1_43_50DB02DB.wem,78d62b1f25c59ddffcfcda75e555e850 Audio_Knives_Skill_2_44_9E69E797.wem,e5c8ad0b282c39c48a3b8b63f1a67ddb Audio_Knives_Skill_2_44_50DB02DB.wem,5b4fb685d45034fd7af19bf3dc330f15 Audio_Knives_Skill_3_45_9E69E797.wem,5f8d8b051be72916575f785a825ee37a
shell命令:
find [指定目录]/ -regex ‘.*\.asset\|.*\.manifest\|.*\.wem\|.*\.bnk‘ -print0|xargs -0 md5sum|awk ‘{print $2 "," $1}‘|awk ‘{split($0,b,"/");print b[length(b)]}‘ > [md5文件路径]/my.md5
时间: 2024-10-12 18:14:22