I have a problem with find. It doesn't find *.sh files if I am in certain directory level. It does, however, find *.sql files./path$ cd do_not_upload/updates/1.1.1//path/do_not_upload/updates/1.1.1$ find . -path *.sh./run_pre_update/002.sh./run_pre_update/001.sh./run_post_update/001.sh/path/do_not_upload/updates/1.1.1$ find . -path *.sh./run_pre_update/002.sh./run_pre_update/001.sh./run_post_update/001.sh/path/do_not_upload/updates/1.1.1$ cd ../path/do_not_upload/updates$ find . -path *.sh./1.1.3/run_pre_update/002.sh./1.1.3/run_pre_update/001.sh./1.1.3/run_post_update/001.sh./1.1.1/run_pre_update/002.sh./1.1.1/run_pre_update/001.sh./1.1.1/run_post_update/001.sh/path/do_not_upload/updates$ cd ../path/do_not_upload$ find . -path *.sh./updates/1.1.3/run_pre_update/002.sh./updates/1.1.3/run_pre_update/001.sh./updates/1.1.3/run_post_update/001.sh./updates/1.1.1/run_pre_update/002.sh./updates/1.1.1/run_pre_update/001.sh./updates/1.1.1/run_post_update/001.sh/path/do_not_upload$ cd ../path$ find . -path *.sh/path$ find . -path *.sql./do_not_upload/updates/1.1.3/sql_migrations/002.sql./do_not_upload/updates/1.1.3/sql_migrations/001.sql./do_not_upload/updates/1.1.1/sql_migrations/002.sql./do_not_upload/updates/1.1.1/sql_migrations/001.sql$ find --versionfind (GNU findutils) 4.4.2/path$ stat do_not_upload/  File: do_not_upload/  Size: 60          Blocks: 0          IO Block: 4096   directoryDevice: 14h/20d Inode: 159862      Links: 3Access: (0775/drwxrwxr-x)  Uid: ( 1000/  jorgee)   Gid: ( 1000/  jorgee)Access: 2014-09-10 14:02:34.449376973 -0300Modify: 2014-09-10 13:54:13.805363567 -0300Change: 2014-09-10 13:54:13.805363567 -0300 Birth: -
Find doesn't want to find *.sh in certain level
shell;find;wildcards
On Unix-like systems, *.sh is a glob expression that is expanded by the shell and the results are passed as arguments to the program being invoked.  If and only if there are no matching files will the glob expression be passed as-is.  You should get in the habit of quoting wildcards if you want them to be passed to the program you're running.As an example, if you were to run find . -path *.sh from /path/do_not_upload/updates/1.1.1/run_pre_update/, the actual command being executed would be find . -path 001.sh 002.sh, which is almost certainly not what you want.Note that this differs from MS-DOS and related systems, where glob expansion is done (or not done) by the program being invoked.To prevent shell expansions, enclose the argument in double or even single quotes - that will pass it to the invoked program verbatim and thus let find do its own expansions:$ find . -path '*.sh'