Networking Forums

Networking Forums > Computer Networking > Linux Networking > Re: find and autofs

Reply
Thread Tools Display Modes

Re: find and autofs

 
 
Thomas Richter
Guest
Posts: n/a

 
      03-05-2010, 07:56 PM
Kevin the Drummer wrote:

> How can I constrain find to not try to search the network? My
> best guess is to constrain it by filesystem type. I thought find
> had a "stay local please" flag.


The GNU version of find offers the -xdev flag which should do exactly that.

> Alternatively, if I could constrain autofs from looking into
> /etc/hosts and trying to mount hosts that I haven't told it to
> mount, that would be great too.


Hmmm, I don't understand what you mean. If autofs isn't supposed to
mount certain hosts, why do you include these hosts in /etc/auto.master
or /etc/auto.misc in first place?

So long,
Thomas
 
Reply With Quote
 
 
 
 
Joe Beanfish
Guest
Posts: n/a

 
      03-08-2010, 06:08 PM
On 03/05/10 14:56, Thomas Richter wrote:
> Kevin the Drummer wrote:
>
>> How can I constrain find to not try to search the network? My
>> best guess is to constrain it by filesystem type. I thought find
>> had a "stay local please" flag.

>
> The GNU version of find offers the -xdev flag which should do exactly that.


-xdev will prevent crossing any filesystem. So if you have 2 local
partitions (disks) mounted it won't get to the 2nd. Use -prune
with -fstype or the path to restrict.

find / -path /net -prune -o -print

find / -fstype nfs -prune -o -print
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




1 2 3 4 5 6 7 8 9 10 11