The default global completions file that comes with Mac OS X uses /etc/hosts to get a list of hostnames. This isn't terribly useful since that file generally never contains anything useful (and there is a comment in the completions file suggesting that it be replaced with something smarter).
Create a file in /usr/local/share/ called common_hosts (make sure it is world readable - 'chmod 644'). Inside this file, list common hostnames (on seperate lines) that you commonly have to type out.
Now edit line line 83 of the global completions file (/usr/share/init/tcsh/completions) so that it refers to the new /usr/local/share/common_hosts file instead of /etc/hosts. i.e.: alias list_all_hostnames 'grep -v "^#" /usr/local/share/common_hosts'
Say your common_hosts file contains the hostname:
If you need to ssh or that host you could just type:
One of the big problems that anyone who wants to use MySQL on OS X faced until now was the inability to safely shutdown the MySQL daemon. Version 3.23.45 was released in the last day or so and fixes this long-standing bug. More information on the changes since the previous version can be found here.
I've downloaded and compiled this version from the source code using some pretty standard configuration options (see below for what I did) and everything appears to be working wonderfully.
Then just run the make and make install commands to compile and install the new binaries. I suspect Marc Liyanage will shortly post a precompiled binary installation but if you're somewhat impatient like me, you can always go this route.
I was talking to someone over on MacSlash and they commented that their 'ls' command didn't output in color. Hmmph...mine did. I looked and found that I had some "carry-overs" in my .cshrc file from my SGI box. To give yourself colorized 'ls' add the following lines to the end of your .cshrc (if you are using tcsh as your default shell):
alias ls 'ls-F' setenv LS_COLORS 'di=35:fi=0:ex=31:or=90' set color
You can change the colors and/or styles for different types of files by using the variables on the second line. Linux StepbyStep provides a good reference guide on color setting.
When I first read the tip about sharing different folders, I thought surely someone will come out with something, and I was right, SharePoints came out, but it was lacking some functions I wanted, like restarting AppleShare.
So I started working on a tool in perl to take care of it for me until a newer version of SharePoints came out that would address these issues. While sharepoints is a great tool with a nice GUI, its new version still lacked this functionality, so I decided to post this one in case anyone wanted to use it.
Read the rest of this article if you'd like to see the script and how to use it...
If you've tried to compile and install openssh yourself, chances are you got the error "Built against 90581f, you have 90602f" that happens when you try and build a new version of OpenSSH."
Most people just punt and stick with the older version of openssh provided with Mac OS 10.1. The trick to compiling openssh so it doesn't give that error is to completely remove the openssl installation and rebuild and install it from source.
The openssl source can be found at Apple's Open Source website. Beware though, the installer doesn't copy over all the header files. You'll need to manually put them in your include/openssl/ directory.
Once you've succesfully done that, you're all set to install the latest version of openssh (3.0.1p1) without any openssl mismatch problems!
I am new to Mac OS X but come from the FreeBSD world so I'm having fun finding out what is here and what isn't. I just realized that one of my favorite tools, 'jot', is here and I wanted to point this out to people. jot allows you to print sequential and random data. More specifically, it allows you to do some really cool things in the shell. Let me give you an example.
I am a big fan of the online music trading organization Etree. There are well-established ways of organizing and naming the concerts that are traded. Occasionally I'll come across a downloaded show that doesn't follow the scheme. Say there are several songs from a Phish show named something like '2001-05-26-phish-d1t1.shn'. The correct format should be 'ph01-05-26d1t1.shn' It would be a real pain in the ass to rename them, right? Well, with jot the answer is a resounding "NO!"
Read the rest of this article for a great primer on using 'jot'...
If you use the XDarwin implementation of the X Windows system from console mode (logging in as >console and bypassing Quartz), you might notice that (on my machine at least) exiting X gives you a blank screen and a spinning rainbow cursor. The computer looks frozen, but in fact is still accepting input: typing "exit" or "logout" at this point will bring you back to the login window after a brief pause.
If you find this a little less than smooth, as I do, you can preface your "startx" command line with the "exec" command like this:
exec startx [X startup options ...]
This little UNIX trick starts X while ending your logon shell, instead of just running X as a child process of your shell. The upshot is that when you exit X, you're immediately returned to the login window, instead of having to type unechoed characters to a beachball. A minor tip, to be sure, but it makes running X from the console a little more elegant.