frances has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to write code that will identify the space available in a given directory on a system with several mount points an a plethora of hard links. This is simple, and works:
@result = `df -Pk $directory`;I would be more comfortable with a solution that would not create an external system call. I know that I can get the device ID for the mount point on which $directory is stored with a stat() call, but I haven't found a way to use $dev to find more infomation about the device.
I feel that there should be a simple way to do this, but I can't find it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to cleanly identify available file system space
by Fletch (Bishop) on Sep 05, 2006 at 20:01 UTC | |
|
Re: How to cleanly identify available file system space
by ambrus (Abbot) on Sep 05, 2006 at 20:12 UTC | |
by frances (Initiate) on Sep 05, 2006 at 22:04 UTC | |
|
Re: How to cleanly identify available file system space
by neilwatson (Priest) on Sep 05, 2006 at 20:10 UTC |