Search This Blog

Shell script: loop through find results

find . -type f |while read file 
do
    size=$(stat --printf=%s $file)
    csum=$(cksum ${file} | awk '{print $1}')
    echo "$file $size $csum"
done

No comments:

Post a Comment