Bug 91229 - find: different results with and without "-ls"
find: different results with and without "-ls"
Status: CLOSED ERRATA
Product: Red Hat Raw Hide
Classification: Retired
Component: findutils (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-20 03:16 EDT by Moritz Barsnick
Modified: 2007-04-18 12:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-05-20 03:19:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Moritz Barsnick 2003-05-20 03:16:29 EDT
Description of problem:
The program "find" gives me different results with and without the "-ls" flag, 
in terms of files found. I have only seen this once, in the noted situation.

Version-Release number of selected component (if applicable):
findutils-4.1.7-10
GNU find version 4.1.7

How reproducible:
only in this situation; maybe always under the correct circumstances, may need 
to provoke and check

Steps to Reproduce:
1. root@sunshine:/usr/src/redhat # find SPECS/ SOURCES/ -name "bcast*" -o -
name "broadcast*"
2. root@sunshine:/usr/src/redhat # find SPECS/ SOURCES/ -name "bcast*" -o -
name "broadcast*" -ls
3.
    
Actual results:
root@sunshine:/usr/src/redhat # find SPECS/ SOURCES/ -name "bcast*" -o -
name "broadcast*" 
SPECS/broadcast2000-sunshine.spec
SPECS/bcast.spec
SOURCES/broadcast2000-modif3.patch
SOURCES/broadcast2000-modif1.patch
SOURCES/broadcast2000-modif2.patch
SOURCES/bcast2000_final_src.tar.gz
SOURCES/bcast-2000c-src.tar.bz2
root@sunshine:/usr/src/redhat # find SPECS/ SOURCES/ -name "bcast*" -o -
name "broadcast*" -ls
989924    4 -rw-r--r--   1 root     root         2058 Jul  2  2000 
SPECS/broadcast2000-sunshine.spec
   640   24 -rw-r--r--   1 root     root        23017 Jul  2  2000 
SOURCES/broadcast2000-modif3.patch
    36   14 -rw-r--r--   1 root     root        14158 Jun 16  2000 
SOURCES/broadcast2000-modif1.patch
    37   16 -rw-r--r--   1 root     root        14824 Jun 16  2000 
SOURCES/broadcast2000-modif2.patch


Expected results:
something like this for the second find command (this is reconstructed 
with "|xargs ls"):
root@sunshine:/usr/src/redhat # find SPECS/ SOURCES/ -name "bcast*" -o -
name "broadcast*" | xargs ls -il
    536 -rw-rw-r--    1 barsnick barsnick  4918376 Jan 17  2001 SOURCES/bcast-
2000c-src.tar.bz2
     38 -rw-rw-r--    1 root     root      2574006 Jan 11  2000 
SOURCES/bcast2000_final_src.tar.gz
     36 -rw-r--r--    1 root     root        14158 Jun 16  2000 
SOURCES/broadcast2000-modif1.patch
     37 -rw-r--r--    1 root     root        14824 Jun 16  2000 
SOURCES/broadcast2000-modif2.patch
    640 -rw-r--r--    1 root     root        23017 Jul  2  2000 
SOURCES/broadcast2000-modif3.patch
 989391 -rw-r--r--    1 barsnick barsnick     4514 Jul 15  2001 SPECS/bcast.spec
 989924 -rw-r--r--    1 root     root         2058 Jul  2  2000 
SPECS/broadcast2000-sunshine.spec

Additional info:
Note the two files not listed by "find -ls" are owned by someone else (!=root). 
There may be some illegal uid checking in the "-ls" implementation?
Comment 1 Moritz Barsnick 2003-05-20 03:19:34 EDT
Aaaaaah darn darn darn! I tried to check it out for hours yesterday. Now (at 
work of all places!) I can see my mistake. "-ls" is only bound to the last "-
name" term, due to missing brackets.
root@sunshine:/usr/src/redhat # find SPECS/ SOURCES/ \( -name "bcast*" -o -
name "broadcast*" \) -ls
would have very very probably done the trick.
:-(
Sorry for the noise,
Moritz

Note You need to log in before you can comment on or make changes to this bug.