bugfindutils - Bugs: bug #15360, Erroneous message

 
 

bug #15360: Erroneous message

Submitter:  None
Submitted:  Tue 03 Jan 2006 01:47:14 PM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Bill Gradwohl Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.20
Fixed Release:  4.2.29
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 07 Aug 2006 10:03:49 AM UTC, comment #4: 

Fixed in 4.2.29 (which has yet to be released) and 4.3.x.

James Youngman <jay>
Group administrator
Fri 24 Feb 2006 07:55:16 PM UTC, comment #3: 

What makes you think the warning is erroneous?   What it says is true.

James Youngman <jay>
Group administrator
Wed 04 Jan 2006 03:01:53 PM UTC, comment #2: 

I checked man find and searched for the word "global" because you used that word in your reply. The word "global" doesn't exist in my version (Fedora Core 4) of find(1).

After your explanation, I re-read man find and discovered the following:
Except for -follow and -daystart, they always  take  effect, rather than being processed only when their place in the expression is reached.  Therefore, for clarity, it  is  best  to place  them at the beginning of the expression.  A warning is issued if you don’t do this.

Please don't take offense at what I'm about to say, as I'm trying to help.

That first sentence - "Except for ... is reached." - is a bit tortured for an English speaker. After your explanation that global options exist, I conclude that the sentence should read as follows:
"Except for -follow and -daystart, they always  take  effect globally, rather than being positionally processed when their place in the expression is reached."

The following sentences then make perfect sense, as global options logically should be specified before other options and tests. Previously, I had no idea that there were global options and regular options, and was always confused by the two headings "OPTIONS" in the man page.

With that change, it would also make sense to re-title the section its in to "GLOBAL OPTIONS" instead of just "OPTIONS" under a sub heading of "EXPRESSIONS". And if "GLOBAL OPTIONS" should preceed regular "OPTIONS", then if might be better to change the order they appear in within the man page to reinforce the concept.

Also, it might help to put up a prototype statement such as:
find [global options] [options] tests actions ...
to again reinforce the concepts.

I now understand that it was a documentation issue I was having a problem with, but I hope you can also see that the documentation as written is a bit confusing.

Anonymous
Tue 03 Jan 2006 05:55:38 PM UTC, comment #1: 

This is no "erroneous message" but a warning.

-maxdepth is a global *option* - many people were not aware of that and erraneous bug-reports where reported about documented correct behavior. That is the reason why find now warns when options aren't specified at the beginning of the commandline.

Andreas Metzler <ametzler>
Tue 03 Jan 2006 01:47:14 PM UTC, original submission:  

This works as expected:
find . -maxdepth 1 -type d | while read x; do echo $x; done
But this doesn't:
find . -type d -maxdepth 1 | while read x; do echo $x; done
find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

The actual results are identical, but one blurts out an erroneous message on stderr.

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

 

Carbon-Copy List
  • -email is unavailable- added by jay (Updated the item)
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2006-11-26 jay Open/ClosedOpen Closed
        Fixed ReleaseNone 4.2.29
    2006-08-07 jay StatusInvalid Fixed
    2006-02-24 jay StatusNone Invalid
        Assigned toNone jay
    2006-01-03 None Carbon-Copy- Added bill --AT-- ycc --DOT-- com

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code