I'm sure you're familiar with
sudo, which stands for superuser, do once. If not, you can see wikipedia. Normally you will use this to write (install) or even delete files in
/usr/binand the like.
Don't forget to read the
manpage on this one. There is always something interesting in the manual.
Many Unix commands appear simple but have numerous options and arguments that make them more like a Swiss Army Knife than a pocketknife. Output on the command line using
mancan be broken up into chunks or streamed using the down arrow, but maybe you want to study it or keep it as a reference.
For some reason you need to format the output from
manin a special way before directing it to a file, for example:
Nearly the whole alphabet! But doing this without the
colleads to selective stuttering:
tailare useful for looking at the first few lines or last few lines of a file.
lessis like what you get when you just do
man some_command---it gives chunks or streams.
man catto see what else that can do.
There is also
splitbut I couldn't figure out how to make it take my favorite separator ('\n\n').
diffdoes what you might expect. The use case might be that you have some good edits but also some bad edits to a file, so you want to revert to the old one, and then try the edits one by one.
results.txtonto TextMate for a little color (graphic).
There's a command to find out information about different processes with finer grained control than Activity Viewer. For example:
findis tricky. I need a lot more practice to understand it. Here's a simple one, and then a fun one though:
I "find" all the files under my home directory and feed the results to
wc(word count), discovering that there are 118,791 lines in the output---that's the number of files! This link seems to have good info on
Sometimes I just want to use Python as a calculator or get an ascii value, but without calling up the interpreter (and having to dismiss it):
Finally, here are a few more that either I've found useful or I'm sure they will be, but I don't feel expert enough to try to explain them. Have fun exploring:
If you get bored here; or try to check out how Greg's email address gets generated!
And there's always
ssh. But that really does deserve a post of its own.