Posted By

troyaner on 08/19/11


Tagged

dir size du


Versions (?)

if directory size is greater than X bytes, echo path


 / Published in: Bash
 

find directory, which size is greater than 1000000 bytes, echo path/

  1. for D in $(find ./ -maxdepth 1 -type d); do if [ $(du -sb $D |awk '{print $1}') -ge 1000000 ]; then echo $D;fi; done

Report this snippet  

You need to login to post a comment.