8

I need locate program file in user's PATH. I found few solution, the best are command and type.

Which is better, faster, UNIX-like way and why?

command -v <application>
type -p <application>

1 Answers1

10

The variant command -v is the defined in the POSIX standard,
so it is exactly the "UNIX-like way to do it".

For the standard, see POSIX - Shell & Utilities - command

For all the details, and still much more details: Why not use "which"? What to use then?

Volker Siegel
  • 17,283