linux - How to find the highest disk space usage mount? -


i'm looking command highest disk space usage mount shown. maximum %usage mount shown.

running df -h

filesystem            size  used avail use% mounted on /dev/vx/dsk/appdg/boom-vol                       1.0g   19m  943m   2% /opt/blah99                       500g  349g  152g  70% /opt/blah/data /dev/vx/dsk/isdg/boom-shared-vol                        50g  1.6g   46g   4% /opt/blah99/product/shared /dev/vx/dsk/isdg/boom-bc-vol                       150g   64g   81g  45% /opt/blah99/product/a_01 /dev/vx/dsk/isdg/boom-bt-vol                       150g   47g   98g  33% /opt/blah99/product/a_02 

output should -

                      500g  349g  152g  70% /opt/blah/data 

what looking is:

df -h | grep -vw "^\/dev" | sort -k 5 -n | tail -n 2 | head -n 1 

output of df -h | grep -vw "^\/dev":

filesystem            size  used avail use% mounted on                       1.0g   19m  943m   2% /opt/blah99                       500g  349g  152g  70% /opt/blah/data                        50g  1.6g   46g   4% /opt/blah99/product/shared                       150g   64g   81g  45% /opt/blah99/product/a_01                       150g   47g   98g  33% /opt/blah99/product/a_02 

sorting column 5 in numeric order: df -h | grep -vw "^\/dev" | sort -k 5 -n:

                       50g  1.6g   46g   4% /opt/blah99/product/shared                       1.0g   19m  943m   2% /opt/blah99                       150g   47g   98g  33% /opt/blah99/product/a_02                       150g   64g   81g  45% /opt/blah99/product/a_01                       500g  349g  152g  70% /opt/blah/data filesystem            size  used avail use% mounted on 

getting second row end: df -h | grep -vw "^\/dev" | sort -k 5 -n | tail -n 2 | head -n 1:

                  500g  349g  152g  70% /opt/blah/data 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -