JKH Training Journal

Friday, July 25, 2008

My growing list of Mac Terminal Commands -- BSD

ssh - username@server.name to connect


cut - This will cut off a line or lines from a given line number to another


grep - awesomely awesome searching tool within the shell


xaurgs - I'm not sure what this means or does but it has the effect of saying "I REALLY MEANT IT" when you execute a command


ps - this will list processes


pwd - this will tell you what your current directory is.


ls - this will list the contents of a directory


cd - this will change you from one directory to another


mkdir - this will make new directory


rmdir - this will remove a directory


man - typing this command with another will return the manual for the command that follows it ie man ssh will give me the manual for the ssh command.


vi - console text processor


> - placing this after a command will write the commands output to a file ps > ~/desktop/processes.txt  will create a text file on the desktop that shows the outout of the ps command. 


| -  this is called pipe and it will pass the output of a one command to another command for example ps | grep 1234 will send the out put of ps to grep and grep will then return instances of the string 1234


logout - ends a session


exit - ends a session


clear - clears the console screen.


say - will call the Mac text to speech app and then speak whatever text you put after the command you can also have it read a file alternately you can have it speak into a file to be played at a later time.


pcast - this will invoke the podcast application, it has about a million flags --server -- user -- pass --camera --start --listworkflows are some of the most important


nano - the Mac BSD super tiny text processor tool the replacement for pico, although pico is still available


host - this tool will return to you the dns lookup information for the host you define.  e.g.  host aces.uiuc.edu  will return aces.uiuc.edu has address 128.174.122.17 aces.uiuc.edu mail is handled by 5 incoming-relays.cites.uiuc.edu.  If you type host 128.174.122.17 the output is 17.122.174.128.in-addr.arpa domain name pointer rhl1.aces.uiuc.edu.


nslookup - another DNS reverse lookup tool that can be leveraged from the Mac PS terminal.