in reply to get the size of a special device (drive)
I need my script to get the size (Preferably in bytes) of a hard drive, I tried this: my $Size = (-s "/dev/sda4"); but it always sets $Size to 0.
Since this seems very OS-specific it may be sensible to use OS-specific tools. Anyway a module like Sys::Filesystem seems like a good start. I found it with a few seconds' CPAN search for Linux device. Other searches may return more appropriate results for you.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: get the size of a special device (drive)
by exodist (Monk) on May 30, 2007 at 21:26 UTC | |
by blazar (Canon) on May 30, 2007 at 21:39 UTC |