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

 
 

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

Submitter:  Martin Steigerwald <msteamix>
Submitted:  Wed 15 Aug 2012 12:34:50 PM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.4.2 Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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 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)
  • -email is unavailable- added by msteamix
  • -email is unavailable- added by msteamix (Submitted 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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-08-15 jay StatusNone Invalid
        Assigned toNone jay
        Open/ClosedOpen Closed
    2012-08-15 ametzler Carbon-CopyRemoved 20807 -
    2012-08-15 msteamix Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code