bugfindutils - Bugs: bug #23964, Conflicting assumptions about...

 
 

bug #23964: Conflicting assumptions about slashes and -name

Submitted by:  James Youngman <jay>
Submitted on:  Wed 30 Jul 2008 11:02:15 AM UTC  
 
Category: findSeverity: 3 - Normal
Item Group: Wrong resultStatus: Works For Me
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Open/Closed: Closed
Release: NoneFixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 30 Jul 2008 12:11:40 PM UTC, comment #1:

The second version CANNOT match anything, and if it did match something, then that is a bug. '-name' implies that a basename search is performed, and the basename of './core.\' is 'core.\', regardless of whether you searched in core* or ./core. The reason your first version matched nothing is because core files with a literal in the name are rare, you probably meant "-name core.\" or "-name 'core.'" in your shell quoting, rather than the overquoted "-name 'core.\*'".

In fact, bug 20970 was all about fixing the -name diagnostics, since the ONLY file that can ever match -name while containing a / is "/" (and "//" on certain systems).

Eric Blake <ericb>
Project Administrator
Wed 30 Jul 2008 11:02:15 AM UTC, original submission:

This matches no files:

find ./core* -maxdepth 0 -name 'core.\*' -print

But this generates a warning message:

find ./core* -maxdepth 0 -name './core.\*' -print

If it's the only possible way to do something, it probably shouldn't generate a warning message.

James Youngman <jay>
Project AdministratorIn charge of this item.

 

(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

 

Carbon-Copy List
  • -unavailable- added by ericb (Posted a comment)
  • -unavailable- added by jay (Submitted the item)
  •  

    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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 31 Aug 2008 02:30:03 PM UTCjayCategoryNone=>find
      Item GroupNone=>Wrong result
      StatusNone=>Works For Me
      Assigned toNone=>jay
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1