This tip allows for easy editing of files such as ~/.tcshrc or ~/.bashrc, so you can click an icon in the dock, and the file will open in TextEdit. Read the rest of the article if you'd like the step-by-step instructions.
For those of you fortran heads, here's good news. FSF GCC now officially supports Darwin/OS X, meaning that you can grab latest source at gcc.gnu.org and build a version of gcc, including fortran (g77), on your OS X box.
Although I don't personally use fortran, this would be a breakthrough for scientists and engineers who use Macs and have *a lot* of fortran libraries. Read yourself Stan Shebs' comment at darwin dev list.
If you're new to UNIX in general, and have only used programs like Fetch or Transmit as FTP tools in the past, you may find the command-line version of FTP quite daunting. There are times when you might want to use this, though, such as when remotely connected to your Mac, and you'd like to download some files locally.
Over in this MacFixit Forums thread, 'JohnBaxter' posted a nice overview of key commands to use when running FTP in a terminal session.
As you get more adventurous in terminal mode, you may wish to explore UNIX commands to get your work done. There's a command called "apropos" that searches all the man(ual) pages for keywords, and voila, a list of appropriate commands appear.
BUT - OS X's "apropos" doesn't work until you establish a "whatis" database. How? Simple:
1) Start a terminal session and get into su mode (root).
2) Type the follow line exactly:
3) Wait several seconds for the root prompt to appear, and quit the terminal session.
Now, you can start a terminal session as yourself, and the "apropos" command will work. For more information about apropos, type "man apropos".
[Editor's note: I published a related tip quite a while back, but I'm sure not everyone has dug through all the pages, so I thought this was a good chance to bring it up again. Note that the makewhatis will also run if you leave your machine on regularly; it's part of a scheduled task that runs (if I recall correctly) weekly.]
If you create a PHP page in Dreamweaver or similar Macintosh application, any bugs will be reported as being on line 1, no matter where they are. This is because the PHP parser is expecting Unix style line breaks. Since it doesn't find them, it thinks the entire page is all one line. This doesn't hurt the running of the PHP code, but it does make it very hard to find any typos or other bugs in the code.
The easiest way to fix this is to open the PHP document in BBEdit and Save As. Click on the OPTIONS button, and select Unix line breaks.
Also, if you are looking for a good SQL tutorial, with a live SQL server, check the following URLS:
For those of you out there that like to do M*ing (Moo, Mud, Muck, Mush, Cold, etc) there is a Unix program called TinyFugue that, to my knowledge, is the leading client for these types of games. This installs just fine on OSX and runs great. (You can go to FreshMeat to find TinyFugue)
I have found that if you just drag the file 'tf' (the TinyFugue app) to the Toolbar and click on it absolutely nothing happens.
Here is how you can get it working. You can go and Get Info on the 'tf' file itself, then 'Show Application' and set it to 'A specific application' and have it fire up Terminal. You will need to set it to show 'All Applications' and you will get a warning that it is not known if this application will launch up this file, but it works great.
I do not know if this works with all terminal based apps, but it did work for TinyFugue.