bugfindutils - Bugs: bug #37106, find: option -L only works when no...

 
 

bug #37106: find: option -L only works when no search path is given:

Submitted by:  Martin Steigerwald <msteamix>
Submitted on:  Wed 15 Aug 2012 12:34:50 PM UTC  
 
Category: findSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Open/Closed: Closed
Release: 4.4.2Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 15 Aug 2012 01:32:28 PM UTC, comment #2:

Hmmm, agreed. As with -H and -P. And as clarified in:

The -H, -L and -P options control the treatment of sym-
bolic links. Command-line arguments following these are
taken to be names of files or directories to be exam-
ined, up to the first argument that begins with `-', or
the argument `(' or `!'. That argument and any follow-
ing arguments are taken to be the expression describing
what is to be searched for. If no paths are given, the
current directory is used. […]

I will add that information to our training slides.

Thanks,
Martin

Martin Steigerwald <msteamix>
Wed 15 Aug 2012 12:52:10 PM UTC, comment #1:

Afaict find works as documented.

Quoting find.1:
SYNOPSIS
find [-H] [-L] [-P] [-D debugopts] [-Olevel] [path...] [expression]

i.e. -L needs to be listed before the path.

cu andreas

Andreas Metzler <ametzler>
Wed 15 Aug 2012 12:34:50 PM UTC, original submission:

Debian Wheezy with

ms@mango:/tmp/foo$ find --version | head -1
find (GNU findutils) 4.4.2

ms@mango:~> zsh --version
zsh 4.3.17 (x86_64-unknown-linux-gnu)

ms@mango:~#1> bash --version | head -1
GNU bash, Version 4.2.36(1)-release (x86_64-pc-linux-gnu)

ms@mango:~> apt-show-versions | egrep "(bash|zsh|findutils)"
bash/wheezy uptodate 4.2-4
bash-completion/wheezy uptodate 1:2.0-1
findutils/wheezy uptodate 4.4.2-4
zsh/wheezy uptodate 4.3.17-1

Happens in Debian Squeeze as well.

How to reproduce:

ms@mango:/tmp> mkdir foo
ms@mango:/tmp> cd foo
ms@mango:/tmp/foo> mkdir bar
ms@mango:/tmp/foo> mkdir baz
ms@mango:/tmp/foo> touch bar/foo
ms@mango:/tmp/foo> ln -s bar link
ms@mango:/tmp/foo> find -L
.
./bar
./bar/foo
./baz
./link
./link/foo
ms@mango:/tmp/foo> find
.
./bar
./bar/foo
./baz
./link
ms@mango:/tmp/foo> LANG=C find . -L
find: unknown predicate `-L'
ms@mango:/tmp/foo> LANG=C find /tmp/foo -L
find: unknown predicate `-L'
ms@mango:/tmp/foo#1>

That was within Z-Shell, also in Bash:

ms@mango:/tmp/foo$ LANG=C find . -L
find: unknown predicate `-L'
ms@mango:/tmp/foo$ LANG=C find /tmp/foo -L
find: unknown predicate `-L'
ms@mango:/tmp/foo$

Expected result:

find accepts -L also when a search path is given.

Thanks,
Martin

Martin Steigerwald <msteamix>

 

(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 jay (Updated the item)
  • -unavailable- added by msteamix
  • -unavailable- added by msteamix (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
    Wed 15 Aug 2012 01:57:21 PM UTCjayStatusNone=>Invalid
      Assigned toNone=>jay
      Open/ClosedOpen=>Closed
    Wed 15 Aug 2012 12:53:09 PM UTCametzlerCarbon-CopyRemoved 20807=>-
    Wed 15 Aug 2012 12:35:22 PM UTCmsteamixCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1