If you're a complete beginner to UNIX (as I still consider myself), you can use something called aliases to save yourself a lot of typing at the command line.
In the Mac OS, an alias is simply a pointer to another file. In the UNIX world, an alias is similar in concept, except that it's a command that points at another command. There are a few pre-defined aliases in the tcsh shell (the program that runs when you open a terminal). You can see these by typing
at the command line. One of the more useful pre-defined aliases is ll which replaces ls -lag for complete file listings.
Although the pre-defined aliases are useful, the real power is in creating your own aliases for your often-used commands. If you're new to UNIX and you'd like to learn about aliases and how to use them, read the rest of this article.
I just wanted to let everyone know that I have successfully built Apache 1.3.17 and PHP 4.04pl1 as a DSO on Mac OS X Public Beta 1H39 (AKA Darwin).
The problem was that the configure script for PHP was trying to create a file in the ./pear directory named 'pear' where a directory named 'PEAR' already exists. Of course, since Mac OS X uses the HFS+ disk format by default (case preserving, case insensitive) this is not allowed. Read the rest of the article if you'd like to see how to modify the configure file to successfully build the latest versions of PHP and Apache.
[Editor's note: This process requires the developer's tools, as you'll need the compiler to build the applications after editing the files.]
If you often transfer the same file to/from an FTP server (or do anything repetitively with an FTP server), you can use UNIX and a simple script to automate the process. Although similar things are probably possible with grapical clients, this will teach you a bit about UNIX and a very basic shell script.
I use two such scripts on my OS X box. Since my home machine is occasinally out of OS X, that means that my family's OS X hosted website is not accessible. Before I shut down OS X, I upload a "Our server is down" page to my ISP-hosted site. When I return to OS X, I upload a "Our server is up" page. This way, our family and friends can tell easily if the site is up or not. I manage both these tasks with a double-click on an icon in the finder, thanks to these scripts.
This tutorial requires some basic understanding of the command line and an OS X text editor such as vi or pico. Read the rest if you'd like to see how to set up a simple automated FTP script.
The default shell (the program that runs when you open a terminal window) is called tcsh. Bash is an alternative with a superset of features that many UNIX users prefer; you can read about it on the Bash information page. Jim Weisbin of savagetranscendental.com has written a great set of instructions for installing the Bash shell in OS X.
You can download Bash from Jim's site, and the installation instructions are included. It's quite simple; if you've used the terminal much at all, it should be fairly straightforward. You can also view the instructions online prior to downloading to get some idea of the process.
The tcsh shell (the one that launches when you start a terminal) has a prompt which looks like this:
You can modify the prompt with the set prompt = command (subtle, I know!). Over on the MacNN forums, this thread includes a great tutorial (written by blanalex) on how to generate some unique and useful prompt strings, including those with colored foregrounds and backgrounds.
I've reproduced the final how-to from the discussion in the remainder of this article, in case the MacNN posting goes away anytime soon.
If you're new to UNIX, the concept of file permissions can be somewhat daunting, to say the least. In a nutshell, permissions control who is able to do what to any given file or directory. It's important that they're properly set, otherwise certain things (such as CGI's for your web server, or shell scripts) may not work as you expect them to.
Read the rest of this article if you'd like an introduction to managing permissions in UNIX. Although quite detailed, this is not intended to be a complete education on file permissions; a good UNIX book is still recommended as the best way to further increase your knowledge.
"JasonB" has written two shell scripts which enable the addition and deletion of users to your OS X system from the command line. Normally this would be done in Netinfo, but the command line option is nice if you ever want to do this remotely.
His scripts and instructions can be found on this page of his web site.
I have not tried these yet personally, but there's no reason to believe they won't work.
crontab is a program that is used to schedule programs to run at certain intervals. It's used in OS X to schedule things like the updating of the index that makes "locate" and "whereis" function. You update crontab through a terminal session.
"anothermacguy" posted on the MacNN forums that he had found a GUI front-end for crontab. Sven Schmidt is the author, and you can find information and the program on his homepage.