bugfindutils - Bugs: bug #13098, find complains that 'paths must...

 
 

bug #13098: find complains that 'paths must precede expression' even when they do

Submitted by:  None
Submitted on:  Mon 16 May 2005 04:46:33 PM UTC  
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Invalid
Privacy:  Public Assigned to:  James Youngman <jay>
Originator Name:  Jesper Juhl Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  None
Fixed Release:  None

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Thu 11 Jan 2007 05:01:47 PM UTC, comment #2: 

Just use Windows and foget that Linux crap

Anonymous
Tue 17 May 2005 11:10:27 PM UTC, comment #1: 

The -name test takes only one argument.  In your command line, the shell is expanding the s into more than one argument before the find command is run.   Therefore you get the error you see.  You should either escape any shell metacharacters in the -name argument or enclose that argument in quotes.

James Youngman <jay>
Project AdministratorIn charge of this item.
Mon 16 May 2005 04:46:33 PM UTC, original submission:  

I often run into find complaining about  paths must precede expression  even if the path(s) to search are indeed listed first.

This might be a user error on my part or a bug in find, I'm not sure, but this seems wrong :

juhl@dragon:~/download/kernel$ cat /etc/slackware-version
Slackware 10.1.0
juhl@dragon:~/download/kernel$ uname -a
Linux dragon 2.6.12-rc4-mm2 #2 Mon May 16 18:14:13 CEST 2005 i686 unknown unknown GNU/Linux
juhl@dragon:~/download/kernel$ find --version
GNU find version 4.1.7
juhl@dragon:~/download/kernel$ pwd
/home/juhl/download/kernel
juhl@dragon:~/download/kernel$ ls -l -d patches-2.6.12-rc4*
drwxr-xr-x  2 juhl users 128 2005-05-15 00:52 patches-2.6.12-rc4
drwxr-xr-x  2 juhl users  88 2005-05-15 11:41 patches-2.6.12-rc4-mm1
juhl@dragon:~/download/kernel$ find ./patches-2.6.12-rc4* -name s
find: paths must precede expression
Usage: find [path...] [expression]
juhl@dragon:~/download/kernel$

I clearly list the directories to search as the first argument, but still find complains.

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

 

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

Only logged-in users can vote.

 

 

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-05-17 jay Item GroupNone => Wrong result
    StatusNone => Invalid
    Assigned toNone => jay
    Open/ClosedOpen => Closed
2005-05-16 None Carbon-Copy- => Added jesper --DOT-- juhl --AT-- gmail --DOT-- com

Back to the top


Powered by Savane 3.5