bugfindutils - Bugs: bug #18375, Error messages with some patterns

 
 

bug #18375: Error messages with some patterns

Submitted by:  None
Submitted on:  Sun 26 Nov 2006 01:22:47 AM UTC  
 
Category: findSeverity: 3 - Normal
Item Group: Wrong resultStatus: Invalid
Privacy: PublicAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: None
Fixed Release: 4.2.27

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 26 Nov 2006 03:50:51 PM UTC, comment #2:

As per Andreas's comment, this is not a bug. It's just that you misunderstood how the Unix shell works.

Thanks,
James.

James Youngman <jay>
Project Administrator
Sun 26 Nov 2006 08:33:30 AM UTC, comment #1:

This is no bug in find.

You need to use single quotes to prevent the shell to expand your wildcards befo
re find can see them. This will work:
sudo find / -name 'wol*'

This example illustrates the problem:
ametzler@argenau:/tmp/x$ mkdir wol1 wol2 blah
ametzler@argenau:/tmp/x$ touch wol1/x wol2/x blah/wolke
ametzler@argenau:/tmp/x$ find ./ -name wol*
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]
ametzler@argenau:/tmp/x$ echo find ./ -name wol*
find ./ -name wol1 wol2

As you can see in the last two lines the commanded that actually is executed is "find ./ -name wol1 wol2" because the shell expands wol* to wol1 wol2. And this command is sytactically invalid.

Both find ./ -name 'wol' and find ./ -name wol\ work.

cu andreas

Andreas Metzler <ametzler>
Sun 26 Nov 2006 01:22:47 AM UTC, original submission:

Finding some patterns ends with an error message:

tibor@GOLDEN10:~$ sudo find / -name wol*
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]↵
tibor@GOLDEN10:~$ find -v

while others go normally:
tibor@GOLDEN10:~$ sudo find / -name gol*
/home/tibor/golden.txt
tibor@GOLDEN10:~$

and of course the problem is mainly with patterns I need...

Tibor

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 26 Nov 2006 03:50:51 PM UTCjayItem GroupNone=>Wrong result
  StatusNone=>Invalid
  Open/ClosedOpen=>Closed
Sun 26 Nov 2006 01:22:47 AM UTCNoneCarbon-Copy-=>Added -unavailable-

Back to the top


Powered by Savane 3.1-cleanup1