Friday, July 31, 2009

In UNIX, how do you determine which of the commands (ie: cd, pwd, ls, cat) are external?

I was asked this in a UNIX course and don't have any clue. Can anyone explain it?

In UNIX, how do you determine which of the commands (ie: cd, pwd, ls, cat) are external?
man (insert name of shell here) to see the list of builtins for the shell you are using, e.g.:





man zsh


man bash





You can also use the type command:





$ type pwd


pwd is a shell builtin





$ type ethtool


ethtool is /usr/sbin/ethtool


No comments:

Post a Comment