- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Linux equivalent of -local option in find stat...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2008 06:34 AM
тАО01-10-2008 06:34 AM
Linux equivalent of -local option in find statement
The "find . -local ..." statement restricted the search to the local machine under HP-UX Unix.
I have a script I want to migrate to a Fedora Core 5 box that uses this option and can't get it to work.
The Linux box has 3 nfs and one samba share filestems on it.
I tried using "find . ! -fstype nfs -a ! fstyep smb -name xxxxx" but the samba share is still searched. How can I search only the local machine without searching each local file system in turn?
[root@stealthdell root]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 521748 90040 405204 19% /
/dev/hda5 1027768 750492 225068 77% /usr
/dev/hda7 2079284 1299768 779516 63% /home
/dev/hda8 1019864 150792 817264 16% /var
none 31120 0 31120 0% /dev/shm
romulus:/apps/batch 2097152 1640800 428128 80% /mnt/batch
romulus:/home 4198400 3278240 867392 80% /mnt/g40home
romulus:/nbcase 14581760 6591808 7742176 46% /mnt/nbcase
//persephone/vol1 240361472 83644416 156717056 35% /home/prodsupp/apollo
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2008 06:52 AM
тАО01-10-2008 06:52 AM
Re: Linux equivalent of -local option in find statement
NFS and Samba are somewhat integrated.
You are using the right statement, but may need to update your syestem with bug fixes.
Try find -fstype ext3
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2008 07:42 AM
тАО01-10-2008 07:42 AM
Re: Linux equivalent of -local option in find statement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2008 12:40 PM
тАО01-10-2008 12:40 PM
Re: Linux equivalent of -local option in find statement
unfortunately neither works.
I tried "-fstype ext3" first and it still grabs floppy, cdrom and nfs as per the following.
I then tried the "not nfs and not smbfs" with identical results. I also tried using parenthesese to group the fstype options but that faile syntax.
Any other suggestions?
[root@stealthdell bin]# find / -fstype ext3 -name '*8.txt'
/usr/share/doc/vim-common-6.0/doc/usr_08.txt
/usr/share/doc/vim-common-6.0/doc/usr_28.txt
/usr/lib/kbd/unidata/UnicodeData-2.1.8.txt
/usr/lib/kbd/unidata/PropList-2.1.8.txt
/usr/lib/kbd/unidata/ReadMe-2.1.8.txt
find: /mnt/floppy: Input/output error
find: /mnt/cdrom: Input/output error
find: /mnt/g40home/nbbuild/.ssh: Permission denied
find: /mnt/g40home/nbbuild/bin: Permission denied
find: /mnt/g40home/nbbuild/Mail: Permission denied
... and so on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2008 03:11 PM
тАО01-10-2008 03:11 PM
Re: Linux equivalent of -local option in find statement
find $(mount -t ext3 | cut -f3 -d' ') -xdev ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2008 06:30 PM
тАО01-10-2008 06:30 PM
Re: Linux equivalent of -local option in find statement
Also, newer Linux boxen don't use 'smbfs' any more, they use 'cifs'. That being said, showing us the output of a 'mount' command would help in that regard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2008 07:34 AM
тАО01-11-2008 07:34 AM
Re: Linux equivalent of -local option in find statement
[boucherr@stealthdell boucherr]$ mount -l
/dev/hda1 on / type ext3 (rw)
none on /proc type proc (rw)
none on /dev type devfs (rw)
/dev/hda5 on /usr type ext3 (rw)
/dev/hda7 on /home type ext3 (rw)
/dev/hda8 on /var type ext3 (rw)
none on /dev/pts type devpts (rw,mode=0620)
none on /dev/shm type tmpfs (rw)
/mnt/cdrom on /mnt/cdrom type supermount (ro,dev=/dev/hdd,fs=iso9660,--,iocharse
t=iso8859-1)
/mnt/floppy on /mnt/floppy type supermount (rw,sync,dev=/dev/fd0,fs=vfat,--,ioch
arset=iso8859-1,umask=0,codepage=850)
none on /proc/bus/usb type usbdevfs (rw,devmode=0664,devgid=43)
romulus:/apps/batch on /mnt/batch type nfs (ro,soft,addr=xxx.xxx.xxx.183)
romulus:/home on /mnt/g40home type nfs (ro,soft,addr=xxx.xxx.xxx.183)
romulus:/nbcase on /mnt/nbcase type nfs (rw,soft,addr=xxx.xxx.xxx.183)
//persephone/vol1 on /home/prodsupp/apollo type smbfs (0)
[boucherr@stealthdell boucherr]$
I tried "find `grep ext3 /etc/fstab | awk '{print $2}'` -mount" and it looks like it's working.
Just another question:
How do I prevent find from following links?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2008 02:41 PM
тАО01-11-2008 02:41 PM