| by Scott Kilroy

Print the total bytes of files in a directory grouped by date

ls -l|awk ‘length($6)==3{x[$6″ “$7]+=$5};END{for(i in x)printf”%s:\t%d\n”,i,x[i]}’

Share Button
Read More
| by Scott Kilroy

Find the largest file in a directory tree

find /path -type f -exec ls -s {} \; | sort -n | tail -1

Share Button
Read More