Skip to content

Instantly share code, notes, and snippets.

@jmurowaniecki
Created January 12, 2015 13:11
Show Gist options
  • Save jmurowaniecki/0c634b07fa35ea508d2c to your computer and use it in GitHub Desktop.
Save jmurowaniecki/0c634b07fa35ea508d2c to your computer and use it in GitHub Desktop.
One liner file quantity check thanks
a=1;b=0;while [ $a -gt $b ];do s=0;for p in * ;do c=`ls $p|wc -l`; echo "$p $c jsons";s=`expr $s + $c`;done;echo -e "Total $s em `date +'%Y%m%d %H%M'`\nDiferença do anterior: `expr $s - $a`";b=$a;a=$s;sleep 60;done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment