Prev: Upgraded my old Debian box to Kernel 2.6.32, but missing sensors datas and can't compile the latest stable NVIDIA driver.
Next: old laptop rebirth with 32 meg ram with wireless
From: Kevin the Drummer on 5 Mar 2010 14:48 I have a few cron jobs which start jobs like 'find / ....' and these jobs, in cooperation with autofs tries to mount all of the hosts in my /etc/hosts file as //net/somehost.fdqn.blah 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, but I can't find that in the manual page, in the info pages, nor through the --help flag. 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. Thanks... -- PLEASE post a SUMMARY of the answer(s) to your question(s)! Unless otherwise noted, the statements herein reflect my personal opinions and not those of any organization with which I may be affiliated.
From: Sidney Lambe on 5 Mar 2010 16:39 On comp.os.linux.misc, Kevin the Drummer <nobody(a)cosgroves.us> wrote: > I have a few cron jobs which start jobs like 'find / ....' and > these jobs, in cooperation with autofs tries to mount all of the > hosts in my /etc/hosts file as //net/somehost.fdqn.blah > > 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, but I can't find that in the > manual page, in the info pages, nor through the --help flag. > > 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. > > Thanks... I think what you need to use is -prune to keep find from accessing the mount points of the remote file systems. But I'm not good enough with find to give you the details. I suggest you post this question on comp.unix.shell. > -- > PLEASE post a SUMMARY of the answer(s) to your question(s)! > Unless otherwise noted, the statements herein reflect my personal > opinions and not those of any organization with which I may be affiliated. What a bunch of nonsense that is. Sid
From: J G Miller on 5 Mar 2010 16:58 On Fri, 05 Mar 2010 22:39:46 +0100, Sidney Lambe wrote: > On comp.os.linux.misc, Kevin the Drummer <nobody(a)cosgroves.us> wrote: >> I have a few cron jobs which start jobs like 'find / ....' and these >> jobs, in cooperation with autofs tries to mount all of the hosts in my >> /etc/hosts file as //net/somehost.fdqn.blah >> >> 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, but I can't find that in the manual page, in >> the info pages, nor through the --help flag. >> >> 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. >> >> Thanks... > > I think what you need to use is -prune to keep find from accessing the > mount points of the remote file systems. Yes or you could add them all to the updatedb.conf file and ensure that updatedb sources it before running. >> -- >> PLEASE post a SUMMARY of the answer(s) to your question(s)! Unless >> otherwise noted, the statements herein reflect my personal opinions and >> not those of any organization with which I may be affiliated. > > What a bunch of nonsense that is. Indeed so -- your boss can still fire you for expressing your opinions even if you put a disclaimer that it is your own opinion. <http://www.npr.ORG/templates/transcript/transcript.php?storyId=123024596> And for a complete updatedb.conf to keep out the extranous stuff ... #*****************************************************************************# #| #| file : /etc/updatedb.conf #| #*--------------------------------------------------------------------------- *# # # Filesystem bind mounts are pruned from updatedb database. # #.............................................................................# # PRUNE_BIND_MOUNTS="yes" # #*--------------------------------------------------------------------------- *# # # Filesystems which are pruned from updatedb database. # #.............................................................................# # PRUNEFS="afs auto autofs binfmt_misc cifs devpts iso9660 msdos ncpfs NFS nfs pipefs proc rootfs selinuxfs sfs shm smbfs sockfs tmpfs udf usbdevfs" # #*--------------------------------------------------------------------------- *# # # Paths which are pruned from updatedb database. # #.............................................................................# # PRUNEPATHS="/auto /boot /dev /export /initrd /lost+found /media /mnt / net /proc /sys /tmp /usr/tmp /var/mail /var/run /var/spool /var/tmp" # #*****************************************************************************#
From: Sidney Lambe on 5 Mar 2010 17:03 On comp.os.linux.misc, J G Miller <miller(a)yoyo.ORG> wrote: > On Fri, 05 Mar 2010 22:39:46 +0100, Sidney Lambe wrote: > >> On comp.os.linux.misc, Kevin the Drummer <nobody(a)cosgroves.us> >> wrote: >> >>> I have a few cron jobs which start jobs like 'find / >>> ....' and these jobs, in cooperation with autofs tries >>> to mount all of the hosts in my /etc/hosts file as >>> //net/somehost.fdqn.blah >>> >>> 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, but I can't find that in >>> the manual page, in the info pages, nor through the --help >>> flag. >>> >>> 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. >>> >>> Thanks... >> >> I think what you need to use is -prune to keep find from >> accessing the mount points of the remote file systems. Or maybe the top dirs of the remote filesystems. This works for one such subdir, but I don't know the syntax for a list of them. find . -path './some-dir' -prune -o -print > > Yes or you could add them all to the updatedb.conf file and > ensure that updatedb sources it before running. > >>> -- PLEASE post a SUMMARY of the answer(s) to your >>> question(s)! Unless otherwise noted, the statements >>> herein reflect my personal opinions and not those of any >>> organization with which I may be affiliated. >> >> What a bunch of nonsense that is. > > Indeed so -- your boss can still fire you for expressing your > opinions even if you put a disclaimer that it is your own > opinion. > ><http://www.npr.ORG/templates/transcript/transcript.php?storyId= >123024596> > > > > And for a complete updatedb.conf to keep out the extranous stuff ... > > > #*****************************************************************************# > #| > #| file : /etc/updatedb.conf > #| > #*--------------------------------------------------------------------------- > *# > # > # Filesystem bind mounts are pruned from updatedb database. > # > #.............................................................................# > # > PRUNE_BIND_MOUNTS="yes" > # > #*--------------------------------------------------------------------------- > *# > # > # Filesystems which are pruned from updatedb database. > # > #.............................................................................# > # > PRUNEFS="afs auto autofs binfmt_misc cifs devpts iso9660 msdos ncpfs NFS > nfs pipefs proc rootfs selinuxfs sfs shm smbfs sockfs tmpfs udf usbdevfs" > # > #*--------------------------------------------------------------------------- > *# > # > # Paths which are pruned from updatedb database. > # > #.............................................................................# > # > PRUNEPATHS="/auto /boot /dev /export /initrd /lost+found /media /mnt / > net /proc /sys /tmp /usr/tmp /var/mail /var/run /var/spool /var/tmp" > # > #*****************************************************************************# That's an excellent solution. Sid
From: Kevin the Drummer on 8 Mar 2010 11:49
Sidney Lambe <sidneylambe(a)nospam.invalid> wrote: > On comp.os.linux.misc, Kevin the Drummer <nobody(a)cosgroves.us> wrote: > > I have a few cron jobs which start jobs like 'find / ....' and > > these jobs, in cooperation with autofs tries to mount all of the > > hosts in my /etc/hosts file as //net/somehost.fdqn.blah > > > > 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, but I can't find that in the > > manual page, in the info pages, nor through the --help flag. > > > > 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. > > > > Thanks... > > I think what you need to use is -prune to keep find from accessing > the mount points of the remote file systems. > > But I'm not good enough with find to give you the details. I > suggest you post this question on comp.unix.shell. Thanks. I'll look further into -prune. > > -- > > PLEASE post a SUMMARY of the answer(s) to your question(s)! > > Unless otherwise noted, the statements herein reflect my personal > > opinions and not those of any organization with which I may be affiliated. > > What a bunch of nonsense that is. Would you prefer "I speak for me"? Or, maybe nothing? Or, maybe some cute/annoying anecdote? The part asking for folks to post a summary comes from when I was a member of the Sun Managers email list. Posting a summary/solution was part of the rules of membership, and the price for the free help. That worked well for me back then. Cheers.... -- PLEASE post a SUMMARY of the answer(s) to your question(s)! Unless otherwise noted, the statements herein reflect my personal opinions and not those of any organization with which I may be affiliated. |