Carl Hutzler's Blog

Photography, Technology Musings, and other Completely Random Thoughts. Hey, it's free.

Easy Symbolic Links for Mac OS X

Mac OS X comes with a built in ability to mac an “alias” to a file or folder which is different than a true symbolic link. By simply holding down the OPTION and APPLE/COMMAND keys at the same time and clicking on the file or folder, you can drag and create one.

Once you have this “alias” you can locate it anywhere you like. It is basically a pointer to the original file and for the most part acts as though it is the original file or folder. If you double click the alias, the original file or folder opens up just like you clicked the real item.

OK, none of this is earth shattering. But the alias capability does not work with some things. For example, EyeTV is a video recording and playback application usually called a PVR. It records shows to a default location inside your home folder. But what if you would rather have these HUGE video files recorded to another location, say on an external drive or a NAS drive. Well EyeTV does not give you an option to change the location it stores files.

But you can trick it….

What if you made an alias which points to the folder where you wanted to store the video files? Then you could rename the alias to be called “EyeTV Archive” and put this alias in the right location in your home folder (I think EyeTV wants it in the ~/Documents folder). Then you would think that EyeTV would go looking for the folder to store or playback a video file and the alias would point it to the remote drive where the videos were actually stored.

Well, this is almost correct. Except that EyeTV (and many other applications) get confused about this “alias” thing and think its a normal file instead of a link to a location. But since Mac OS X is unix underneath, there is another type of link that you can make that applications ARE able to follow. Its called a symbolic link.

I have used these many times. Symbolic Links create pointers to files and folders just like an alias does. But for some reason they seem to work with more applications and don’t have the limitations of the alias. But in the old days (before today!) I used to have to go to a unix shell in remember how to use the ln command. This was not all that hard, but it was kind of a pain.

Today I found Symbolic Linker (PS: Right-Click on the download link and SAVE AS otherwise you might get the data showing in your browser window) which is a nifty piece of freeware. Once you install it (make sure to read the readme instructions!) it allows you to simply right-click on a file or folder and select Make Symbolic Link down at the bottom. Then you get something that looks just like an alias, but functions a lot better.

Symbolic Link

9 comments

9 Comments so far

  1. T_Ken September 27th, 2007 11:37 pm

    Carl, cool post. I can think of a few places where I could use that.

    But when I clicked on the “Symbolic Linker” link, it takes me to the admin-login to your blog! Oooops.

  2. cdhutzler September 28th, 2007 6:05 am

    Yup. Doing two things at once will get you burned. Thanks, Ken :-)

  3. Ben September 29th, 2007 7:35 am

    The symbolic link is a nice throwback to when you really needed some smarts (or least the ability to read a manual) to manage computers. However, a small correction to your comments on EyeTV, you can change the location of the recordings. It’s in the preferences section under the heading . . . Recording.

  4. cdhutzler September 29th, 2007 7:59 am

    Yes, you can change the location. You are right. But I think what I meant was that when EyeTV goes to export a movie for your iPod, it does the export and then it sticks it in your iTunes library. What I have found is that eyetv defaults to your Itunes library being in the normal location ~/music/iTunes and if its not, it actually changes the location back to the default! Or at least I think that is what it does as I can;t think of any other reason it changes.

  5. Michael Hale January 21st, 2009 3:21 pm

    Hi all,
    Can someone tell me how to use symlinks to make several drives appear as a single large drive?
    I’m using an NMT which will only mount one share at a time and I’ve got six shares; big drag when trying to use a media jukebox.
    Is it doable?

  6. Carl Hutzler January 22nd, 2009 3:28 pm

    What is an NMT? Network Media Tank?

    A symlink is just a “pointer” to a real file or directory. So I am not sure that you could use a symlink to “join” a bunch of drives/shares together into a single share or whatever you are trying to do.

    Is the inability to mount more than one share a known limitation with NMT? This seems like a rather strange limit in this day and age.

    Other than changing your host system to have a single large share with perhaps different sub directories for Music, Video, etc, I am not sure of a way to address the issue.

  7. Michael Hale January 22nd, 2009 4:03 pm

    Yup, Network Media Tank.

    In my case it’s the Popcorn Hour A-100 by Syabas.

    Note: for my purposes the words share and drive are interchangeable.

    For reasons unknown to me, and to every other user apparently, the device will allow one to map up to six volumes/shares but will only play content from one at a time.

    The upshot of this is that one is obliged to create an index.htm and jukebox folder for each share.

    I have to go to the PH’s Source menu and select one of the shares, if the index.htm file and jukebox folder are at the root of the drive/share, YAMJ (Yet Another Media Jukebox) will display my .mkv, .avi. etc. files with the appropriate poster art and NFO content from IMDB or TheTVDB.
    Perfect, almost.

    If I want to serve content from another drive I have to back all the way out to the Source menu and pick another share, yada, yada.

    I’m trying to find a way to have four 1-TB HDDs appear as one large volume to the PH so I can run YAMJ and create one index.htm and one jukebox folder for everything, movies, TV, documentaries, the whole nine yards ;)

    Somehow, I think I may have muddied the waters even further by trying to explain, sorry.

  8. Carl Hutzler January 22nd, 2009 4:12 pm

    Have you considered having your data on a separate network attached storage (NAS) server? I know you are probably thinking this would mean buying another thing for your network, but having your data on a speedy NAS is a great thing and not expensive.

    Netgear (formerly Infrant) makes a product line called ReadyNAS. There are several models available. The smallest called the DUO will allow you to have two SATA drives in RAID 0 or 1 and on your network. So you could buy two 1TB drives and have 2TB of raw storage (non-redundant) or 1TB of mirrored storage.

    Or you could move up to one of the 4 bay units (NV+ or 1100) and start with just two drives with the ability to add more. When you get to 3 or more, you can arrange the drives in a RAID 5 configuration – both speed and redundancy.

    ReadyNAS is fairly cheap. I believe you can expect to pay about $300-$500 for the machine and then whatever you would normally pay for HDDs. The nice part is once you get your storage on a real file server like the ReadyNAS (or similar from Buffalo, etc), you have much more flexibility. And these units can do 30-40Mbps streaming (READ) and 10-20Mbps (WRITE). So bandwidth should not be an issue on a wired network.

    Email me if you have more questions. But I can assure you that the ReadyNAS can serve data in just about any configuration – AFP, SMB, FTP, HTTP, NFS and as many shares as you like…or as few as you like. It also offers full unix admin via ssh if you like and backup protocol RSYNC to protect your data.

    It is a great product and I own several.

  9. Carl Hutzler January 22nd, 2009 4:13 pm

    Oh, and Readynas units come with UPNP and Bonjour type protocols for easy discovery by media players.

Leave a reply