Terminal Tips and Tricks for Mac OS X
Some really awesome neat Terminal commands.
For instance opensnoop
:
sudo opensnoop
sudo opensnoop -p PID
sudo opensnoop -f /etc/passwd
or the commands to interact with the OS X clipboard pbcopy
and pbpaste
:
grep 'search term' largeFile.txt | pbcopy
pbpaste | sed 's/ /%20/g'
And I really like these:
- Open a man page in Preview:
pman () {
}man -t "${1}" | open -f -a /Applications/Preview.app
- Open a man page in TextMate:
tman () {
}MANWIDTH=160 MANPAGER='col -bx' man $@ | mate
Great for any .profile or .bash_profile.