Forum: Ruby on Rails How to get the disk space details

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mallikarjun M. (Guest)
on 2007-05-21 15:44
Hi,
For my application, i want to now the size of the disks. ex(c:\ or d:\).
can any one help me to get the disk space used and disk space remaining
in C: drive


Thanks in advance

mallikarjun
Mohit S. (Guest)
on 2007-05-21 16:59
(Received via mailing list)
Mallikarjun Mongolla wrote:
> Hi,
> For my application, i want to now the size of the disks. ex(c:\ or d:\).
> can any one help me to get the disk space used and disk space remaining
> in C: drive
>
>
> Thanks in advance
>
> mallikarjun
>

Do you want to do this on the server or the client?  If you want your
web application running on the server to find the amount of free space
on the client's machine, I don't think it can be done from a server side
script.  You will need some thing like a Java applet to do this.

On the other hand, if you want to find the amount of space on the
server, Google turned up this:
http://www.deheus.net/petrik/blog/post/98/ [for Mac]
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/... [for
Windows]

Cheers
Mohit.
Zach I. // LT3media (Guest)
on 2007-05-21 20:38
(Received via mailing list)
Rails supports system() commands. So if you type: system('dh'),
personally i'd type:
system('dh -h') for a nicer output :)

Cheers
Zach I.
→ Blog — http://www.zachinglis.com
→ Company — http://www.lt3media.com
→ Portfolio — http://portfolio.zachinglis.com
Eno (Guest)
on 2007-05-21 23:07
(Received via mailing list)
On May 21, 12:37 pm, Zach I. // LT3media <removed_email_address@domain.invalid>
wrote:

> Rails supports system() commands. So if you type: system('dh'),
> personally i'd type:
> system('dh -h') for a nicer output :)


Im assuming you meant 'df' ...


--
A
This topic is locked and can not be replied to.