Bluehost.com Web Hosting $6.95

find prune question

This is a discussion on find prune question within the Linux General forums, part of the Linux Forums category; Hi, In order to find all files on the system but not in the /mnt directory and whose names begin ...


Go Back   Usenet Forums > Linux Forums > Linux General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-12-2005
pascal
 
Posts: n/a
Default find prune question

Hi,

In order to find all files on the system but not in the /mnt directory
and whose names begin with my_file, i tried without success

find / -name 'my_file*' -path '/mnt' -prune -o -print

Any suggestion please ?


Pascal
Reply With Quote
  #2 (permalink)  
Old 03-12-2005
Malte
 
Posts: n/a
Default Re: find prune question

pascal wrote:
> Hi,
>
> In order to find all files on the system but not in the /mnt directory
> and whose names begin with my_file, i tried without success
>
> find / -name 'my_file*' -path '/mnt' -prune -o -print
>
> Any suggestion please ?
>
>
> Pascal

Actually, if updatedb was run recently, using locate would be much, MUCH
faster.
Reply With Quote
  #3 (permalink)  
Old 03-12-2005
Dan Espen
 
Posts: n/a
Default Re: find prune question

pascal <pascal@invalid.fr> writes:

> Hi,
>
> In order to find all files on the system but not in the /mnt directory
> and whose names begin with my_file, i tried without success
>
> find / -name 'my_file*' -path '/mnt' -prune -o -print
>
> Any suggestion please ?


find / -path /mnt -prune -o -name 'my_file*' -print
Reply With Quote
  #4 (permalink)  
Old 03-12-2005
noi
 
Posts: n/a
Default Re: find prune question

On Sat, 12 Mar 2005 15:23:57 +0100, pascal thoughtfully wrote:

> Hi,
>
> In order to find all files on the system but not in the /mnt directory and
> whose names begin with my_file, i tried without success
>
> find / -name 'my_file*' -path '/mnt' -prune -o -print
>
> Any suggestion please ?
>
>
> Pascal



Interesting. I think your problem is with the -o print
Try
find / -path '/mnt' -prune -o -name 'my_file*'
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:42 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0