awk
whne using du to find the size of directories, awk can be used to isolate the directories that are in the MB size range like so: > du -h --max-depth=1 | awk '$1 ~ /M/' | sort -n the ~ in the awk statement is the matching operator. Note: in awk $0 is the entire line, $NF is the last column, whatever the number is and NF by itself is the number of the last column.
Tags:
tricks
awk
Posts by eta_pol tagged awk
http://eta-pol.livejournal.com/18213.html (Cached)
0 links
Published: 11 months, 2 weeks ago (Wed, 30 Jul 2008 01:55:22 PDT); 382 bytes |