This question already has an answer here:
I'm just writing some small C scripts and testing them. Why dose
~ Desktop: gcc test.c -o test ; /Users/xx/Desktop/test ;
work just fine while
~ Desktop: gcc test.c -o test ; test ;
dose not work? Why dose OSX/ZSH need the full path to execute the binary?