inconsistent results for basename? In the following, why is the third instance of basename including the file's enclosing directory?
WGroleau@MBP Music % basename Korean/kr_audio.tbz
kr_audio.tbz
WGroleau@MBP Music % basename ./Korean/kr_audio.tbz
kr_audio.tbz
WGroleau@MBP Music % time find . -type f -exec echo &quot;$(basename &quot;{}&quot;) ++ $(dirname &quot;{}&quot;)&quot; \; &gt; /tmp/tmp
find . -type f -exec echo &quot;$(basename &quot;{}&quot;) ++ $(dirname &quot;{}&quot;)&quot; \; &gt; /tmp/tmp  3.93s user 6.74s system 87% cpu 12.181 total
WGroleau@MBP Music % head !$
head /tmp/tmp
./Tx-01-00.mp3 ++ .
./Korean/kr_audio.tbz ++ .
./syn_HCA001-Cem.m4a ++ .
./Cetera.amad ++ .
./.DS_Store ++ .
./Japanese/JAI.tbz ++ .
./.localized ++ .
./iTunes SongKong/iTunes Library Extras.itdb ++ .
./iTunes SongKong/iTunes Music Library.xml ++ .
./iTunes SongKong/.DS_Store ++ .
Took some digging but the answer is available in Unix &amp; Linux:

Process substitution (the $(...) part) occurs before find gets even executed
So before find even starts, $(basename &quot;{}&quot; gets executed returning {}, turning your command into find . -type f -exec echo &quot;{}&quot; \; 
Now find starts and just echos each file found.

The output of dirname just looked right because dirname {} (or actually dirname ANY-FILE) always returns . (see the part after Either the dir is &quot;/&quot; or there are no slashes in dirname.c).
As an alternative you can use
find . -type f -exec sh -c 'echo &quot;$(basename $1) ++ $(dirname $1)&quot;' _ {} \;