Tech Musings

Tuesday, December 06, 2005

symlinks (symbolic links)

I've found it's handy to know how to create symlinks via the Terminal in OS X. Here's an example:

ln -s ~/styles/stylesheet.css (source file) stylesheet.css (target or name of link)

I would issue the command above to create a symbolic link(s) in directories such as ~/New_ETR_site/styles/stylesheet.css and ~/UCCASS/styles/stylesheet.css to a style sheet I always remember to update located in /Users/me/styles/stylesheet.css.

In this example I would need to first "cd" to the corresponding directories where I wanted to place the symbolic links BEFORE issuing the command above! Or, if I wasn't in the directory where I wanted to place the symlink I could do the following...

Update 1-3-2007!!
Here is an example: To install the Oracle Instant Client and SDK package prior to creating a configuration build for php, I needed to create a symbolic link as (
or called, or the target) /usr/lib/instantclient10_1/libclntsh.dylib directing to (or the source) libclntsh.dylib.10.1. I "cd'd" to /usr/lib/instantclient10_1 and typed the following syntax:

ln -s
libclntsh.dylib.10.1 /usr/lib/instantclient10_1/libclntsh.dylib

Read This For Help

Servers use symlinks or pointers rather than aliases to allow system services (e.g. Apache) the ability to see and follow links to certain files. Obviously, system services do not have the ability to "double-click" on shortcuts or aliases in a GUI window like us!


Post a Comment

Links to this post:

Create a Link

<< Home