xx searches the directories listed in the
PATH environment variable for a file called
xx. The first executable it finds (whether a binary or a script), it executes. It does not look in the current directory, unless
. is listed in
PATH, which is not recommended.
./xx runs the file called
xx that is located in the current directory, if there is an executable file with that name there.
To run a file by specifying its location, you must include a
/ symbol. If there is no
/ in the command (actually, the first word of the command, which is what identifies the name of the file to be executed), it searches
PATH for it. If there is a
/, then the first word of the command is taken to refer to a specific file by location.
./xx is different from
xx because of the
/ that it contains.
/xx would not work properly--it would try to run a file called
xx located in the root directory,
. represents the current directory,