find, find, find

find, find, find

Post by George Le » Wed, 31 Jan 2001 21:35:53



I need to use "find" command to search for a file, for example, "myprog.c".
But I just want to search it on my local file systems. i.e. I don't want to
search the /net directory or
any directory that is a mounted NFS shares.

Tried the following:

find / -local -a -name myprog.c

and

find / ! -fstype nfs -a -name myprog.c

But both of these commands still go to the /net dir and NFS mounted dir
searching for the file.

How can I avoid this?

Please help. Thanks.

 
 
 

find, find, find

Post by Thommy M. Malmstr? » Sat, 03 Feb 2001 04:54:30


Look for mount in the find(1) man page.

/Thommy M.


> I need to use "find" command to search for a file, for example, "myprog.c".
> But I just want to search it on my local file systems. i.e. I don't want to
> search the /net directory or
> any directory that is a mounted NFS shares.

> Tried the following:

> find / -local -a -name myprog.c

> and

> find / ! -fstype nfs -a -name myprog.c

> But both of these commands still go to the /net dir and NFS mounted dir
> searching for the file.

> How can I avoid this?

> Please help. Thanks.


 
 
 

find, find, find

Post by Mark Hargrav » Sat, 03 Feb 2001 04:56:35


Try: find / -type f -mount -name "myprog.c" -print

Thanks,

Mark


> Look for mount in the find(1) man page.

> /Thommy M.


> > I need to use "find" command to search for a file, for example, "myprog.c".
> > But I just want to search it on my local file systems. i.e. I don't want to
> > search the /net directory or
> > any directory that is a mounted NFS shares.

> > Tried the following:

> > find / -local -a -name myprog.c

> > and

> > find / ! -fstype nfs -a -name myprog.c

> > But both of these commands still go to the /net dir and NFS mounted dir
> > searching for the file.

> > How can I avoid this?

> > Please help. Thanks.

--
Mark Hargrave  <><

Web:   http://www.markhargrave.com
"Depart from evil and do good; seek peace and pursue it" (Psalm 34:14)
 
 
 

find, find, find

Post by missy_law.. » Sat, 03 Feb 2001 05:33:04


hello,
try :
find / -mount -name "myprog.c" -print

the -mount should keep find on the local filesystem.

-missy


  Thommy M. =?iso-8859-1?Q?Malmstr=F6m?=


> Look for mount in the find(1) man page.

> /Thommy M.


> > I need to use "find" command to search for a file, for

example, "myprog.c".

Quote:> > But I just want to search it on my local file systems. i.e. I don't
want to
> > search the /net directory or
> > any directory that is a mounted NFS shares.

> > Tried the following:

> > find / -local -a -name myprog.c

> > and

> > find / ! -fstype nfs -a -name myprog.c

> > But both of these commands still go to the /net dir and NFS mounted
dir
> > searching for the file.

> > How can I avoid this?

> > Please help. Thanks.

Sent via Deja.com
http://www.deja.com/
 
 
 

find, find, find

Post by Philip Bro » Sun, 04 Feb 2001 11:12:44



>hello,
>try :
>find / -mount -name "myprog.c" -print

>the -mount should keep find on the local filesystem.

That will limit itself to just the ONE filesystem you are on.
Note that the original poster used the plural:

Quote:>> > But I just want to search it on my local file systems.

                                                         ***

--
[Trim the no-bots from my address to reply to me by email!]
[ Do NOT email-CC me on posts. Pick one or the other.]

The word of the day is mispergitude

 
 
 

find, find, find

Post by cjvenro » Mon, 05 Feb 2001 13:24:49


these folks are wrong:

try

$ find . -name myprog.c -xdev

ps everyone looks for the libraries, not the sources :)

Sent via Deja.com
http://www.deja.com/

 
 
 

find, find, find

Post by Kjetil Torgrim Homm » Wed, 21 Feb 2001 13:49:47


[George Lee]

Quote:>   I need to use "find" command to search for a file, for example, "myprog.c".
>   But I just want to search it on my local file systems. i.e. I don't want to
>   search the /net directory or
>   any directory that is a mounted NFS shares.

>   Tried the following:

>   find / -local -a -name myprog.c

>   and

>   find / ! -fstype nfs -a -name myprog.c

>   But both of these commands still go to the /net dir and NFS
>   mounted dir searching for the file.

Yes, but it will only report files which are not on NFS file systems
;-)

Quote:>   How can I avoid this?

Use -prune instead:

  find / -fstype nfs -prune -o -name myprog.c

Kjetil T.