[oclug] Ln command question.
doneill at linuxcare.com
Tue Jan 23 14:52:26 EST 2001
On Tue, 23 Jan 2001, Blashy - none - wrote:
> Thanks for the lesson Dave.
> Are you a teacher? You explained it very well and simple to comprehend.
Nope, I'm just a regular geek.
> Apart from using links for auto back up, programing, what else is it usefull
> for in the Linux world.
Lots of things. For example, if you have files on a certain partition
that need to appear somewhere else in your filesystem hierarchy, it's
often easier to create symbolic links to them, rather than maintain two
copies. This is the approach I used to use my Windows TrueType fonts
Another use of both hard links and symbolic links is to have
multiple-entry executables. Rather than have several executables that all
perform related functions, you can have one executable that will change
its behaviour based on the name it is called by. 'busybox'
(http://busybox.lineo.com/) and 'mtools' take this approach.
For a really bizzare use of links, take a look at the minimalist
windowmanager WMX (http://www.all-day-breakfast.com/wmx/). It's
configuration data takes advantage of the fact that symbolic links don't
actually have to point to an existing file. To set configuration options,
you would create a symbolic link from the file .wmx/options to a string
containing the actual options you want to set, like so:
ln -s "focus:follow,keyboard:off" .wmx/options
Then, all the window manager does is perform a readlink() on the file
.wmx/options to read in the string containing configuration data.
Dave O'Neill, Senior Linux Consultant, Linuxcare, Inc.
desk: (613) 562-9949 fax: (613) 562-9700 cell: (613) 223-0219
doneill at linuxcare.com http://www.linuxcare.com/
More information about the OCLUG