Where is the code for the terminal command 'tee' located in Mac OS?
[Added] Is it possible to read the exact code, that my mac is using (not the online codes)?
Where is the code for the terminal command 'tee' located in Mac OS?
[Added] Is it possible to read the exact code, that my mac is using (not the online codes)?
It's BSD, not Linux, code.
http://www.pell.portland.or.us/~orc/Code/bsd/bsd-current/tee/tee.c
Here is the source code of Apple's unix:
http://developer.apple.com/Darwin/
If it is up-to-date this is the exact code that your mac uses.
Do you mean, where is the executable? If that's what you're asking, it's at /usr/bin/tee
. You can locate any command in your path by using the which
utility. It will print out the full path to the command. For example:
$ which tee
/usr/bin/tee
$
If you're asking about the actual source code, a number of answers are already here that provide you with links to Apple's source code. The utilities themselves are split amongst a number of packages and there's no real index, so you'll have to browse the names and check packages that sound like they might contain the source for any given utility.