find error

Loïc Grenié loic.grenie at
Wed Oct 6 09:32:59 UTC 2010

2010/10/6 Tapas Mishra <mightydreams at>:
> On Wed, Oct 6, 2010 at 1:39 PM, Loïc Grenié <loic.grenie at> wrote:
>> 2010/10/6 Tapas Mishra <mightydreams at>:
>>> I used find in following fashion to exclude find to search in directory /opt
>>> find / -name java -prune  -o -name /opt -print
>>    What you seem to mean is:
>> find /opt -name java
>>    (search /opt for files (and directories) named java).
>>         Hope this helps,
> No I want to search for java in entire root but excluding /opt

     you'll have to check, but it could be:

find / -fullname '/opt' -prune -o -name java -print


More information about the ubuntu-users mailing list