Loading

mac mdls统计视频时长

mdls -name kMDItemDurationSeconds -name kMDItemFSName *

1,

mdls -name kMDItemDurationSeconds  *|awk '{sum+=$3} END {print sum}'

2,

mdls -name kMDItemDurationSeconds  * > a.txt

cat a.txt| awk '{sum+=$3} END {print sum}'

3,

mdls -name kMDItemDurationSeconds  * > a.txt

cat a.txt | cut -d " " -f 3 > b.txt

cat b.txt | awk '{sum+=$1} END {print sum}'

 

posted @ 2024-03-01 19:25  stono  阅读(4)  评论(0编辑  收藏  举报