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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Space available on disk

Status
Not open for further replies.

xavier64

Technical User
Nov 18, 2002
12
FR
Hi,
I'm looking for a command giving me the space available on my hard disk.

I've tried "exec dir" but this command only return me the list of files in the directory

 
Thanks for your answer,
but i'm looking for the command or a procedure making an unix df and not du.
I don't care if the procedure make an exec.
I can't use exec df cause i'm running my script under windows.

Thanks,
 
This seems to work for me:

proc get_available_space {} {
set fp [open |bin/df]
gets $fp title
gets $fp disk_usage
close $fp
foreach {device blocks used available\
procentage mount} $disk_usage break
return $available
}

I hope it helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top