Sometimes a command is aliased to itself. For example:
$ type ls ls is aliased to `ls -al'
How do I invoke
type on the
ls command itself (and not the alias)?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
From the description of
The -P option forces a PATH search for each name, even if
type -t namewould not return file. If a command is hashed, -p and -P print the hashed value, which is not necessarily the file that appears first in PATH
$ type ls ls is aliased to `ls -FG' $ type -P ls /bin/ls
$ type -a ls ls is aliased to `ls -FG' ls is /bin/ls
might be helpful sometimes.