Skip to content

Instantly share code, notes, and snippets.

@matheuseduardo
Created January 22, 2019 12:47
Show Gist options
  • Save matheuseduardo/3d226c83ab0e64e52b4b029b16d6813d to your computer and use it in GitHub Desktop.
Save matheuseduardo/3d226c83ab0e64e52b4b029b16d6813d to your computer and use it in GitHub Desktop.
shell script to list sizes of pics & vids
anos=`seq 2016 2018`; # 2016 a 2018
meses=`seq -w 1 12`; # todos os meses
for ano in $anos
do
for mes in $meses
do
data=$ano$mes;
tam=`du -c DCIM/**/IMG_$data*.jpg DCIM/**/VID_$data*.mp4 2> /dev/null | tail -1 | cut -f 1`
echo $data: $tam
done;
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment