parsing df column values

Hi all,

I need to run df, and parse the value under column of "Mounted on"

For instance, my df is

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              4881344   4106460    526924  89% /
none                    245164       220    244944   1% /dev
none                    252044        24    252020   1% /dev/shm
none                    252044       104    251940   1% /var/run
none                    252044         0    252044   0% /var/lock

I need to run df that show only column of Mounted.. How can I do this? I tried with shell, but still stuck in getting the mount values.

Thank you

Try:

df | cut -d" " -f6

shows me empty lines..

Can you post the df output inside code tags ?

yes. sorry my mistake. ok i did it :

df -k | grep -v used | awk '{ print $6 "\t" }'

Or even:

df -k | grep -v "Used" | awk '{ print $6}'

For portability, many would use:

df -P | grep -v "Used" | awk '{ print $6}'
 
df | awk '!/Used/ {print $6}'