coec has asked for the wisdom of the Perl Monks concerning the following question:
I have a Perl script that traverses a directory structure, processing files as it goes. The script needs to not leave the current filesystem, basicaly, equiv to adding -xdev to Unix find. I'm looking for a better way to do this.
Currently I'm doing equiv to `df . | awk '{print $1}'` and checking that the filesystem is the same. I was looking for a pure Perl solution and all I can think of is using "(stat $dir)[0]".
Are there better ways of doing this?
Thanks
CC
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Filesystem checking
by Zaxo (Archbishop) on Apr 30, 2004 at 07:05 UTC | |
|
Re: Filesystem checking
by pelagic (Priest) on Apr 30, 2004 at 07:29 UTC | |
by coec (Chaplain) on Apr 30, 2004 at 12:57 UTC | |
by pelagic (Priest) on Apr 30, 2004 at 13:35 UTC | |
by eserte (Deacon) on Apr 30, 2004 at 13:53 UTC | |
by Anonymous Monk on Apr 30, 2004 at 18:47 UTC | |
|
Re: Filesystem checking
by eserte (Deacon) on Apr 30, 2004 at 08:58 UTC |