iTunes For Mac: The Quickest Way To Move Your iTunes Music Folder To An External Hard Drive
November 15, 2008
I got an external hard drive to use as a dedicated store for my iTunes library. Strangely enough when I tried to move my iTunes music folder location to the external drive with the “Keep iTunes Music folder organized” under Advanced settings, and the “Consolidate Library…” under File -> Library, nothing happened.
I double checked the process to do this against Apple’s support knowledge base article, but my music files stayed exactly where they were previously on my MacBook’s main disk.
I then figured that maybe I can trick iTunes into thinking it is accessing a local folder. So how do we do this? Well just create a folder alias: Click the music folder on your external hard drive and hold down the mouse button. Then, while holding down the Command (Apple key) and Option (alt) keys simultaneously, drag the folder alias to where you want it to appear (I placed mine on the main Finder menu, next to the original Music folder on OS X), and let go of the mouse button. Instead of moving the original item, this will create an alias at the new location. Preferably you’d want to rename it to something other than Music, so you can easily differentiate it from the original Music folder on Mac. I called mine MusicExt.
Now just go to the Advanced Preference; change the iTunes music folder location to the alias folder and then Consolidate your Library. iTunes will then display a dialog, showing the files being moved to their new location.
Mac OS X Common Admin Tasks
April 12, 2008
What follows here is a list of tasks that I perform from time to time on Mac OS X. I do not do a lot of Mac OS X (Darwin) administration, but every now and then I do the odd MySQL or Apache installation and configuration. Many times when tuning these types of server applications and services, I typically encounter a few scenarios not considered in the installation guide. It is at these times that I am forced to venture on my own into the world of system administration. The problem is that I do not do it enough to remember all the typical shell commands, and workarounds, or maybe I just have a very poor memory from all the coffee that I have been drinking over the years. Either way it often results in me having to rediscover, again, how to do certain things in the Mac shell. This short list solves that by serving as a quick reference.
Maybe it will be of use to other novice system administrators.
User And Group Administration
- Add a user to a group in the bash shell on Mac OS X
To make a user part of a group in the bash shell, type:
sudo dscl . -append /groups/[groupName] GroupMembership [userName]To check whether the user was successfully added to the group, reopen a new shell and use the groups command to check which groups the user is part of.
Scripting
- Make Mac OS X script executable
Let’s say the file is called GhostBlade: The command to make it executable is chmod +x GhostBlade. if you want it to run from the finder, rename the file to GhostBlade.command .
That’s it, for now. Feel free to send me your Mac OS X admin tips and tricks, and I’ll gladly to add them to the list.
Setting up MySQL for Python (MySQLdb) on Mac OS X
November 16, 2007
MySQL is an excellent, very popular and open source database management system. A binary installation is available for Mac OS, and the process of installing MySQL on Mac OS is also very well documented. So just head over to MySQL.com, where you will find the binary installation, together with extensive installation, and usage documentation.
To connect to MySQL from Python use MySQL for Python (MySQLdb). Get MySQLdb from http://sourceforge.net/projects/mysql-python/.
- Download MySQL from mysql.com and install the DBMS as instructed in the documentation.
- Make sure “Library/Python/2.3” does not have:
- Directory “MySQL”
- File “_mysql.pyd”
- File “_mysql_exceptions.py”
- File “_mysql_exceptions.pyc”
- Download and unpack MySQL for Python. At the time of writing this is MySQL-python-1.2.1_p2.tar.gz .
- Open Terminal and change to the directory where MySQLdb was unpacked to.
- Get rid of any previous builds that might interfere, by deleting the “build” directory if it exists.
- Edit the setup.py file, and change:
return popen(“mysql_config –%s” % what)
to
return popen(“/usr/local/mysql/bin/mysql_config –%s” % what) - Cleanup any previous install attempts:
python setup.py clean
- Build MySQLdb:
python setup.py build
Either uninstall MySQL for Python if a setup program was used to install it, otherwise manually delete them.
Viola! MySQL for Python is all setup, and ready for your Python-MySQL data access code. Enjoy!





