What is the difference between the commands test -e path and test -f path?
They are equivalent options with the same behavior.
The -f option tests for a regular file. The -e option tests for an empty file.
Both options check the existence of the path. The -f option also confirms that it is a regular file.
The -f option tests for a regular file. The -e option tests for an executable file.
Referência recomendada para estudo
test -e returns true if the file exists (any type). test -f returns true only if the file exists and is a regular file.
test -e
test -f