Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disk space available 1

Status
Not open for further replies.

YO123

MIS
Jul 26, 2001
77
BE
What command do I use to I see 'just a number' of disk space available?

I'm writing an installation script and want to test if the directory/volume entered as installation directory has enough space to put all the files. The amount of space needed is known.

Can anyone help me with this?

Thanks,

YO
 
If, for example, I wanted to know how many kb were free in /usr, I would do:

df -k /usr | tail -1 | awk '{print $3}'

HTH
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top