With GNU, BSD or BusyBox find (i.e. on Linux, *BSD or Cygwin):
find targetDir -mindepth -name 'target*'
If you only have POSIX find (e.g. on Solaris or MINIX), the easy way is to change to the toplevel directory first. Then the location of the search has the unique name
. which you can exclude.
( cd targetDir && find . -name . -o -name 'target*' -print )
If you really need to run from another directory, you can exclude directories called
targetDir, but that will also exclude things like
Alternatively, you can make the shell do the work for you. Use a set of patterns to match all files in a directory. A downside is that you'll get an error message from
find if one of the patterns doesn't match.
find targetDir/..?* targetDir/.[!.]* targetDir/* -name 'target*'
If you know that there are no dot files in the directory and that the directory is not empty, you can go with just
find targetDir/* -name 'target*'