Unix Shell - why "find ... ! -fstype nfs .. " does not work?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > June 2006 > why "find ... ! -fstype nfs .. " does not work?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author why "find ... ! -fstype nfs .. " does not work?
James

2006-06-21, 7:21 pm

Hi all,

I want to search for core dump files across the whole filesystem.
The command line is
pdossudo find / -name core ! -fstype nfs -print

However, during command executing, it keeps freeze at
"NFS server foobar not responding still trying"
There is even no time-out, so I have to kill -9 theprocess.

I wondered why "! -fstype nfs" is not effective and where I should
check NFS setup.

Many thanks,

James

Stephane CHAZELAS

2006-06-21, 7:21 pm

2006-06-21, 14:24(-07), James:
> Hi all,
>
> I want to search for core dump files across the whole filesystem.
> The command line is
> pdossudo find / -name core ! -fstype nfs -print
>
> However, during command executing, it keeps freeze at
> "NFS server foobar not responding still trying"
> There is even no time-out, so I have to kill -9 theprocess.
>
> I wondered why "! -fstype nfs" is not effective and where I should
> check NFS setup.

[...]

It doesn't prevent find from descending into directories over
NFS, it just tells it not to print the path of the files there.

find / -fstype nfs -prune -o -print

But, if there's a non-NFS filesystem mounted in a NFS mounted
file system, you'll miss it (like /home over NFS but /home/local
over /dev/dsk/...)

--
Stéphane
James

2006-06-22, 1:27 pm


Stephane CHAZELAS wrote:
> 2006-06-21, 14:24(-07), James:
> [...]
>
> It doesn't prevent find from descending into directories over
> NFS, it just tells it not to print the path of the files there.
>
> find / -fstype nfs -prune -o -print


Where should I put the "-name core" expression?
before or after "-o"?

>
> But, if there's a non-NFS filesystem mounted in a NFS mounted
> file system, you'll miss it (like /home over NFS but /home/local
> over /dev/dsk/...)
>


Steffen Schuler

2006-06-22, 7:23 pm

James wrote:
> Stephane CHAZELAS wrote:
>
>
>
> Where should I put the "-name core" expression?
> before or after "-o"?
>
>
>
>

find / -fstype nfs -prune -o -name core -print
Stephane CHAZELAS

2006-06-23, 7:31 am

2006-06-22, 10:51(-07), James:
[...]
>
> Where should I put the "-name core" expression?
> before or after "-o"?

[...]

After

See man find for details.


--
Stéphane
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com