7

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>
3

1 Answer 1

9

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?

Not the answer you're looking for? Browse other questions tagged or ask your own question.