Pages

Saturday, February 15, 2014

List directory size with max depth on IBM AIX

$ du -g | perl -ne 'print if (tr#/#/# == <maximum depth>)'

Lists directory size up to a maximum traversal depth on systems like IBM AIX, where the du command doesn't have Linux's --max-depth option. AIX's du uses -g to display directory size on gigabytes, -m to use megabytes, and -k to use kilobytes.




commandlinefu.com


by David Winterbottom (codeinthehole.com)






from All commands http://ift.tt/1bTeqFU

No comments:

Post a Comment