0

in my Linux machine I run the following command under from /usr/cti/APPS directory

   cd /usr/cti/APPS
   mount -t nfs $server:$target_dir /mnt

I want to show something very interesting

I can run the following find command from any directory in my linux machine as ( /var/tmp , /usr/cti , /etc/APP/conf ) and get results

    /bin/find /mnt/DIR  -name *.txt* 

but when I run the find command from /usr/cti/APPS directory , then find command not print any results ,

Please advice why I can’t get results from the directory that was performed the mount? And how to fix that?

example

    cd /usr/cti/APPS

    /bin/find /mnt/DIR  -name *.txt* 

    NOT GET ANY OUTPUT


    cd ..

    /bin/find /mnt/DIR  -name *.txt* 

    GET RESULTS
maihabunash
  • 443
  • 1
  • 11
  • 25
  • 3
    This question appears to be off-topic because it is a cross post with http://unix.stackexchange.com/questions/144289/linux-mount-to-target-directory-from-local-dir-problem – HBruijn Jul 13 '14 at 13:03

1 Answers1

4

Very easy, it is because you have files matching the *.txt* pattern inside /usr/cti/APPS and the shell expands your expression. Try to use '*.txt*' instead of *.txt* in the find expression.

Florin Asăvoaie
  • 7,057
  • 23
  • 35