Some corrections and elaborations...
Originally posted by Santiago
...Logging out from the terminal window:
kill -9 -1
This is BAD advice. You should definitely not get in the habit of doing this. I promise it will eventually cause you heartache.
You should think of "kill -9" to read "destroy violently". You don't want to have to be violent to your computer, but
sometimes it's necessary. Only sometimes. Be kind to your loyal computer. Quit your terminal with
logout,
exit, CTRL-D (my fav) or COMMAND-Q (to quit all terminals).
cd.. Exp: Moves you back one dir
That's not true.
cd.. isn't a command. What he meant to say was
cd ..
While
cd.. would have worked in DOS, this is Unix. See, in this case,
cd is a command and
.. is an argument being passed to cd. The command cd changes directories (
cd /usr would go to the /usr directory, for instance) and
.. means "whatever directory is below this one". It's "below" because the File System is thought of like a tree (that, for whatever reason, has no trunk). So, using this idea, the directory / is called the "root directory" and everything else branches off of it.
Sure, it sounds more like a shrub, but trees are cooler ;-)
But, back to the point, you have to separate your command from its arguments. that separation is a space.
rm *.* *1= x file *2= extension ie: .bin .txt etc
Again, this isn't DOS. What this command is saying is "delete every file that has a period (or 'dot') in it". Well, lots (and I mean LOTS) of files don't have a dot in them. And, also, this ignores all files that
start with a dot (such files are "hidden", as you generally don't mess with them on a day-to-day basis, so, they're just kept "out of the way"). What this should have read (to really delete absolutely everything, including subdirectories) is:
rm -r .* *
rm is the command
-r means "recursively" (meaning "all of the subdirectories, too)
.* means everything starting with a dot
* means everything not starting with a dot
You should obviously be very careful when doing this.
ping (Network IP) Pings the IP you specify in numbers. Might work with letters.
I assume he means "DNS Name" by "letters". And, it certainly does work with DNS names. My personal standard for making sure the Network is functional is
ping yahoo.com because yahoo is almost
never down.
A few other commands that I am a big fan of are:
pwd
Tells you what directory you're in.
cd ~
That "squiggly" is a tilde (you can say "TILL-duh" or "TILL-dee", depending on where you're from ;-)) - to make it, it's SHIFT-key.just.to.the.left.of.the.1 - what this command does is takes you to your "home" directory. That is, the directory that you go to when you start up a new terminal window. usually /Users/username in Mac OS X (it's /Users/boinger for me, for instance)
cd -
This means "change to whatever directory I was just in" - it's for "flipping between" two directories. So, if you are in /usr/local/bin pokin' around, and you decide you need to go to your home directory for a second, you can get back to /usr/local/bin with
cd - instead of having to type
cd /usr/local/bin again. neat, eh?
hostname
this tells you what machine you are on. good for if you're ssh'ing (or, *cough* telnetting, for the brave) to a bunch of different machines in a bunch of different terminal windows
whoami
Tells you what user you are. If you're doing potentially dangerous stuff, make sure you are who you think you are.
I think that's about it for now - for this essentials, anyway.
If you wish you knew how to do something, but just can't figure out how (or if), please ask - I am both a Mac Zealot and a Unix Sys Admin (don't find too many of us around), and I am very excited about this OS and will help it gain acceptance and increase useability for its users any way I can.
--boinger