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

 
 

bug #18375: Error messages with some patterns

Submitter:  None
Submitted:  Sun 26 Nov 2006 01:22:47 AM UTC
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Invalid
Privacy:  Public Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  None
Fixed Release:  4.2.27
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

 

 

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-11-26 jay Item GroupNone Wrong result
    StatusNone Invalid
    Open/ClosedOpen Closed
2006-11-26 None Carbon-Copy- Added -unavailable-

Back to the top


Powered by Savane 3.9