Running AIX 5.3, the "find" command is not working as expected. - Aix

This is a discussion on Running AIX 5.3, the "find" command is not working as expected. - Aix ; Running AIX 5.3, the "find" command is not working as expected. Here's an example where I get results from a subdirectory, but not from root. Anybody know why? Thanx in advance. abcaixxx:/stage/abcDB10g>find . -name runInstaller 2>/dev/ null ../client/runInstaller ../clusterware/runInstaller ../companion/runInstaller ...

+ Reply to Thread
Results 1 to 12 of 12

Thread: Running AIX 5.3, the "find" command is not working as expected.

  1. Running AIX 5.3, the "find" command is not working as expected.

    Running AIX 5.3, the "find" command is not working as expected.

    Here's an example where I get results from a subdirectory, but not
    from root.

    Anybody know why?

    Thanx in advance.

    abcaixxx:/stage/abcDB10g>find . -name runInstaller 2>/dev/
    null
    ../client/runInstaller
    ../clusterware/runInstaller
    ../companion/runInstaller
    ../database/runInstaller
    ../gateways/runInstaller
    abcaixxx:/stage/abcDB10g>cd /
    abcaixxx:/>find . -name runInstaller 2>/dev/null
    abcaixxx:/>


  2. Re: Running AIX 5.3, the "find" command is not working as expected.

    On May 21, 4:15 pm, Beldar wrote:
    ....
    > Anybody know why?


    One of your directories (stage or abcDB10g) is a symbolic link?
    find doesn't follow symlinks by default.

    Marc


  3. Re: Running AIX 5.3, the "find" command is not working as expected.

    On May 21, 5:15 pm, Beldar wrote:
    > Running AIX 5.3, the "find" command is not working as expected.
    >
    > Here's an example where I get results from a subdirectory, but not
    > from root.
    >
    > Anybody know why?
    >
    > Thanx in advance.
    >
    > abcaixxx:/stage/abcDB10g>find . -name runInstaller 2>/dev/
    > null
    > ./client/runInstaller
    > ./clusterware/runInstaller
    > ./companion/runInstaller
    > ./database/runInstaller
    > ./gateways/runInstaller
    > abcaixxx:/stage/abcDB10g>cd /
    > abcaixxx:/>find . -name runInstaller 2>/dev/null
    > abcaixxx:/>



    If /stage is part of / meaning it has not ist own filesystem - they
    try the -xdev option for find and/or capure the error out put of find
    to a file and check that file.

    hth
    Hajo


  4. Re: Running AIX 5.3, the "find" command is not working as expected.

    On May 21, 4:15 pm, Beldar wrote:
    ....
    > Anybody know why?


    One of your directories (stage or abcDB10g) is a symbolic link?
    find doesn't follow symlinks by default.

    Marc


  5. Re: Running AIX 5.3, the "find" command is not working as expected.

    On 2007-05-21, Marc Girod wrote:

    > On May 21, 4:15 pm, Beldar wrote:
    > ...
    >> Anybody know why?

    >
    > One of your directories (stage or abcDB10g) is a symbolic link?
    > find doesn't follow symlinks by default.


    That may be true, but it doesn't explain why the "find" command
    doesn't find *anything* when invoked from the root directory.

    Even if the original dir is a symlink, that symlink points somewhere.
    That "somewhere" should be found when find is invoked from the root.

    To the original poster: if all else fails, try truss-ing the process.
    Carefully look at the output to see what find is doing.

    --
    Jurjen Oskam

    Savage's Law of Expediency:
    You want it bad, you'll get it bad.

  6. Re: Running AIX 5.3, the "find" command is not working as expected.

    On May 21, 11:37 am, Marc Girod wrote:
    > On May 21, 4:15 pm, Beldar wrote:
    > ...
    >
    > > Anybody know why?

    >
    > One of your directories (stage or abcDB10g) is a symbolic link?
    > find doesn't follow symlinks by default.
    >
    > Marc


    Nope. No symbolic links involved.


  7. Re: Running AIX 5.3, the "find" command is not working as expected.

    On May 21, 12:33 pm, Hajo Ehlers wrote:
    > On May 21, 5:15 pm, Beldar wrote:
    >
    >
    >
    >
    >
    > > Running AIX 5.3, the "find" command is not working as expected.

    >
    > > Here's an example where I get results from a subdirectory, but not
    > > from root.

    >
    > > Anybody know why?

    >
    > > Thanx in advance.

    >
    > > abcaixxx:/stage/abcDB10g>find . -name runInstaller 2>/dev/
    > > null
    > > ./client/runInstaller
    > > ./clusterware/runInstaller
    > > ./companion/runInstaller
    > > ./database/runInstaller
    > > ./gateways/runInstaller
    > > abcaixxx:/stage/abcDB10g>cd /
    > > abcaixxx:/>find . -name runInstaller 2>/dev/null
    > > abcaixxx:/>

    >
    > If /stage is part of / meaning it has not ist own filesystem - they
    > try the -xdev option for find and/or capure the error out put of find
    > to a file and check that file.
    >
    > hth
    > Hajo- Hide quoted text -
    >
    > - Show quoted text -


    -xdev option did not work. I have tried looking at the error output,
    but there's nothing related in it.


  8. Re: Running AIX 5.3, the "find" command is not working as expected.

    On May 21, 2:42 pm, Beldar wrote:
    > On May 21, 11:37 am, Marc Girod wrote:
    >
    > > On May 21, 4:15 pm, Beldar wrote:
    > > ...

    >
    > > > Anybody know why?

    >
    > > One of your directories (stage or abcDB10g) is a symbolic link?
    > > find doesn't follow symlinks by default.

    >
    > > Marc

    >
    > Nope. No symbolic links involved.


    I remember seeing something similar...
    check permissions on /stage and /stage/abcDB10g


  9. Re: Running AIX 5.3, the "find" command is not working as expected.

    On May 21, 9:19 pm, Beldar wrote:
    > On May 21, 12:33 pm, Hajo Ehlers wrote:
    >
    >
    >
    > > On May 21, 5:15 pm, Beldar wrote:

    >
    > > > Running AIX 5.3, the "find" command is not working as expected.

    >
    > > > Here's an example where I get results from a subdirectory, but not
    > > > from root.

    >
    > > > Anybody know why?

    >
    > > > Thanx in advance.

    >
    > > > abcaixxx:/stage/abcDB10g>find . -name runInstaller 2>/dev/
    > > > null
    > > > ./client/runInstaller
    > > > ./clusterware/runInstaller
    > > > ./companion/runInstaller
    > > > ./database/runInstaller
    > > > ./gateways/runInstaller
    > > > abcaixxx:/stage/abcDB10g>cd /
    > > > abcaixxx:/>find . -name runInstaller 2>/dev/null
    > > > abcaixxx:/>

    >
    > > If /stage is part of / meaning it has not ist own filesystem - they
    > > try the -xdev option for find and/or capure the error out put of find
    > > to a file and check that file.

    >
    > > hth
    > > Hajo- Hide quoted text -

    >
    > > - Show quoted text -

    >
    > -xdev option did not work. I have tried looking at the error output,
    > but there's nothing related in it.


    A)
    What you mean with ' - xdev ' does not work ?

    B)
    So could you please provide the following information
    1) Is /stage or /stage/abcDB10g a filesystem or part of '/' or even
    mounted via NFS ?
    $ lsfs
    $ mount

    2) What are the security setting on / /stage and /stage/abcDB10g
    ls -ld / /stage /stage/abcDB10g

    3) Do a simple find for the following directories and point the outpt
    to a file
    find /stage > /tmp/find0.out 2>/tmp/find0.err
    find /stage/abcDB10g > /tmp/find1.out 2>/tmp/find1.err
    find / > /tmp/find2.out 2>/tmp/find2.err

    Now check the output for 'runInstaller'

    hth
    Hajo






  10. Re: Running AIX 5.3, the "find" command is not working as expected.

    On May 22, 3:25 am, Hajo Ehlers wrote:
    > On May 21, 9:19 pm, Beldar wrote:
    >
    >
    >
    >
    >
    > > On May 21, 12:33 pm, Hajo Ehlers wrote:

    >
    > > > On May 21, 5:15 pm, Beldar wrote:

    >
    > > > > Running AIX 5.3, the "find" command is not working as expected.

    >
    > > > > Here's an example where I get results from a subdirectory, but not
    > > > > from root.

    >
    > > > > Anybody know why?

    >
    > > > > Thanx in advance.

    >
    > > > > abcaixxx:/stage/abcDB10g>find . -name runInstaller 2>/dev/
    > > > > null
    > > > > ./client/runInstaller
    > > > > ./clusterware/runInstaller
    > > > > ./companion/runInstaller
    > > > > ./database/runInstaller
    > > > > ./gateways/runInstaller
    > > > > abcaixxx:/stage/abcDB10g>cd /
    > > > > abcaixxx:/>find . -name runInstaller 2>/dev/null
    > > > > abcaixxx:/>

    >
    > > > If /stage is part of / meaning it has not ist own filesystem - they
    > > > try the -xdev option for find and/or capure the error out put of find
    > > > to a file and check that file.

    >
    > > > hth
    > > > Hajo- Hide quoted text -

    >
    > > > - Show quoted text -

    >
    > > -xdev option did not work. I have tried looking at the error output,
    > > but there's nothing related in it.

    >
    > A)
    > What you mean with ' - xdev ' does not work ?
    >
    > B)
    > So could you please provide the following information
    > 1) Is /stage or /stage/abcDB10g a filesystem or part of '/' or even
    > mounted via NFS ?
    > $ lsfs
    > $ mount
    >
    > 2) What are the security setting on / /stage and /stage/abcDB10g
    > ls -ld / /stage /stage/abcDB10g
    >
    > 3) Do a simple find for the following directories and point the outpt
    > to a file
    > find /stage > /tmp/find0.out 2>/tmp/find0.err
    > find /stage/abcDB10g > /tmp/find1.out 2>/tmp/find1.err
    > find / > /tmp/find2.out 2>/tmp/find2.err
    >
    > Now check the output for 'runInstaller'
    >
    > hth
    > Hajo- Hide quoted text -
    >
    > - Show quoted text -


    ************************************************** ************************************************** *************************************
    Thanx for your reply.

    A) What you mean with ' - xdev ' does not work ?

    --> "find . -xdev -name runInstaller 2>/dev/null" does not return
    anything when run from /

    B) So could you please provide the following information

    1) Is /stage or /stage/abcDB10g a filesystem or part of '/' or even
    mounted via NFS ?
    $ lsfs
    -->:
    abcaixxx:/>lsfs
    Name Nodename Mount Pt VFS Size
    Options Auto Accounting
    /dev/hd4 -- / jfs 524288
    -- yes no
    /dev/stagelv -- /stage jfs 92274688
    rw yes no
    abcaixxx:/>

    $ mount
    -->:
    abcaixxx:/>mount
    node mounted mounted over vfs date
    options
    -------- --------------- --------------- ------ ------------
    ---------------
    /dev/hd4 / jfs May 14 11:01 rw,log=/
    dev/hd8
    /dev/stagelv /stage jfs May 14 11:01 rw,log=/
    dev/loglv04
    abcaixxx:/>


    2) What are the security setting on / /stage and /stage/abcDB10g
    ls -ld / /stage /stage/abcDB10g

    -->:
    abcaixxx:/>ls -ld / /stage /stage/abcDB10g
    drwxr-xr-x 38 root system 1536 May 22 00:43 /
    drwxr-sr-x 9 oraapps dba 512 May 21 15:15 /stage
    drwxrwsrwx 9 oraapps dba 512 Mar 06 16:53 /stage/
    abcDB10g
    abcaixxx:/>



    3) Do a simple find for the following directories and point the outpt
    to a file
    find /stage > /tmp/find0.out 2>/tmp/find0.err
    find /stage/abcDB10g > /tmp/find1.out 2>/tmp/find1.err
    find / > /tmp/find2.out 2>/tmp/find2.err
    --> Done

    Now check the output for 'runInstaller'
    -->:
    abcaixxx:/tmp>grep runInstaller find*
    find0.out:/stage/abcDB10g/client/runInstaller
    find0.out:/stage/abcDB10g/clusterware/runInstaller
    find0.out:/stage/abcDB10g/companion/runInstaller
    find0.out:/stage/abcDB10g/database/runInstaller
    find0.out:/stage/abcDB10g/gateways/runInstaller
    find1.out:/stage/abcDB10g/client/runInstaller
    find1.out:/stage/abcDB10g/clusterware/runInstaller
    find1.out:/stage/abcDB10g/companion/runInstaller
    find1.out:/stage/abcDB10g/database/runInstaller
    find1.out:/stage/abcDB10g/gateways/runInstaller
    abcaixxx:/tmp>



  11. Re: Running AIX 5.3, the "find" command is not working as expected.

    On May 22, 3:25 am, Hajo Ehlers wrote:
    > On May 21, 9:19 pm, Beldar wrote:
    >
    >
    >
    >
    >
    > > On May 21, 12:33 pm, Hajo Ehlers wrote:

    >
    > > > On May 21, 5:15 pm, Beldar wrote:

    >
    > > > > Running AIX 5.3, the "find" command is not working as expected.

    >
    > > > > Here's an example where I get results from a subdirectory, but not
    > > > > from root.

    >
    > > > > Anybody know why?

    >
    > > > > Thanx in advance.

    >
    > > > > abcaixxx:/stage/abcDB10g>find . -name runInstaller 2>/dev/
    > > > > null
    > > > > ./client/runInstaller
    > > > > ./clusterware/runInstaller
    > > > > ./companion/runInstaller
    > > > > ./database/runInstaller
    > > > > ./gateways/runInstaller
    > > > > abcaixxx:/stage/abcDB10g>cd /
    > > > > abcaixxx:/>find . -name runInstaller 2>/dev/null
    > > > > abcaixxx:/>

    >
    > > > If /stage is part of / meaning it has not ist own filesystem - they
    > > > try the -xdev option for find and/or capure the error out put of find
    > > > to a file and check that file.

    >
    > > > hth
    > > > Hajo- Hide quoted text -

    >
    > > > - Show quoted text -

    >
    > > -xdev option did not work. I have tried looking at the error output,
    > > but there's nothing related in it.

    >
    > A)
    > What you mean with ' - xdev ' does not work ?
    >
    > B)
    > So could you please provide the following information
    > 1) Is /stage or /stage/abcDB10g a filesystem or part of '/' or even
    > mounted via NFS ?
    > $ lsfs
    > $ mount
    >
    > 2) What are the security setting on / /stage and /stage/abcDB10g
    > ls -ld / /stage /stage/abcDB10g
    >
    > 3) Do a simple find for the following directories and point the outpt
    > to a file
    > find /stage > /tmp/find0.out 2>/tmp/find0.err
    > find /stage/abcDB10g > /tmp/find1.out 2>/tmp/find1.err
    > find / > /tmp/find2.out 2>/tmp/find2.err
    >
    > Now check the output for 'runInstaller'
    >
    > hth
    > Hajo- Hide quoted text -
    >
    > - Show quoted text -


    A) What you mean with ' - xdev ' does not work ?

    --> "find . -xdev -name runInstaller 2>/dev/null" does not return
    anything when run from /

    B) So could you please provide the following information

    1) Is /stage or /stage/abcDB10g a filesystem or part of '/' or even
    mounted via NFS ?
    $ lsfs
    -->:
    abcaixxx:/>lsfs
    Name Nodename Mount Pt VFS Size
    Options Auto Accounting
    /dev/hd4 -- / jfs 524288
    -- yes no
    /dev/stagelv -- /stage jfs 92274688
    rw yes no
    abcaixxx:/>

    $ mount
    -->:
    abcaixxx:/>mount
    node mounted mounted over vfs date
    options
    -------- --------------- --------------- ------ ------------
    ---------------
    /dev/hd4 / jfs May 14 11:01 rw,log=/
    dev/hd8
    /dev/stagelv /stage jfs May 14 11:01 rw,log=/
    dev/loglv04
    abcaixxx:/>


    2) What are the security setting on / /stage and /stage/abcDB10g
    ls -ld / /stage /stage/abcDB10g

    -->:
    abcaixxx:/>ls -ld / /stage /stage/abcDB10g
    drwxr-xr-x 38 root system 1536 May 22 00:43 /
    drwxr-sr-x 9 oraapps dba 512 May 21 15:15 /stage
    drwxrwsrwx 9 oraapps dba 512 Mar 06 16:53 /stage/
    abcDB10g
    abcaixxx:/>



    3) Do a simple find for the following directories and point the outpt
    to a file
    find /stage > /tmp/find0.out 2>/tmp/find0.err
    find /stage/abcDB10g > /tmp/find1.out 2>/tmp/find1.err
    find / > /tmp/find2.out 2>/tmp/find2.err

    Now check the output for 'runInstaller'
    -->:
    abcaixxx:/tmp>grep runInstaller find*
    find0.out:/stage/abcDB10g/client/runInstaller
    find0.out:/stage/abcDB10g/clusterware/runInstaller
    find0.out:/stage/abcDB10g/companion/runInstaller
    find0.out:/stage/abcDB10g/database/runInstaller
    find0.out:/stage/abcDB10g/gateways/runInstaller
    find1.out:/stage/abcDB10g/client/runInstaller
    find1.out:/stage/abcDB10g/clusterware/runInstaller
    find1.out:/stage/abcDB10g/companion/runInstaller
    find1.out:/stage/abcDB10g/database/runInstaller
    find1.out:/stage/abcDB10g/gateways/runInstaller
    abcaixxx:/tmp>




  12. Re: Running AIX 5.3, the "find" command is not working as expected.

    Since /stage has its own filesystem we must narrow to problem

    Possible cause i could think of
    - Security setting on underlying mount points.
    - Corrupted filesystem causing find to stop traversing the directory
    tree
    - find is buggy or find is an alias with some strange settings
    - acl are used

    1)
    Check the version of find you are using and use the full path for find

    $ which find
    $ /usr/bin/find / -name runInstaller

    2) Issue the command as an root user.

    3) Check what mounts are in between '/' and 'stage'
    Example:
    mount shows:

    /
    /usr
    ....
    /test
    /stage

    Now verify that you can find within the next filesystem an existing
    file there.
    Meaning that you check if you can find a known file in
    /usr
    ....
    /test
    /stage

    Example:
    find / -name unix
    find / -name find # Should find /usr/bin/find
    ....

    The filesystem where the test will fail or the fs before that might
    cause the problem.

    4)
    Umount /stage and check the permission on the mount point itself
    $ umount /stage
    $ ls -ld /stage

    5)
    Check if ACL are used or not.

    6)
    run
    $ truss -c /usr/bin/find / -name runInstaller
    and see whats really going on.

    hth
    Hajo


+ Reply to Thread