I need a script that can send to a text file the fs name and the avail space in gb

LindaC
LindaC used Ask the Experts™
on
Hi experts:

I need a script that can send to a text file this:
Solaris 5.9

filesystem name           available space in gb (without the gb. numbers please)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2013
Top Expert 2013
Commented:
Showing the mountpoint:

df -k | awk '!/Filesystem/ {printf "%16s %8.3f\n", $NF, $4/1024/1024}' > textfile

Showing the volume:

df -k | awk '!/Filesystem/ {printf "%16s %8.3f\n", $1, $4/1024/1024}' > textfile

Author

Commented:
Thank you!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial