grinder has asked for the wisdom of the Perl Monks concerning the following question:
Fellow monks, I am rewriting a shell script in Perl. The shell script calls find(1) with the -mount switch, to stop it crossing filesystem boundaries.
I'm in the middle of my wanted() sub for the usual suspect and I don't know how to mimic the -mount behaviour. I can think of two ways but I baulk at implementing them.
It there some obvious (read: elegant) way in Perl to determine whether a directory is a mount point, short of either parsing /etc/mnttab (sigh) or the output of df (eeeeww) ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: find(1) and its -mount switch
by arhuman (Vicar) on Apr 13, 2001 at 16:37 UTC |