|
|
Using the 'ls' command, which is standard on these systems, a symbolically linked filed might look something like this:
In contrast with hard links, there are no restrictions on where a symbolic link can point, it can refer to a file on another file system, to itself or to a file which does not even exist (e.g. when the target of the symlink is removed). Such problems will only be detected when the link is accessed.
Another option under Windows are Junction Points (this requires NTFS 5.0), which are more similar to symbolic links than windows shortcuts.
Usage
Symbolic links are created with the ln -s command. For example:ln -s name_of_real_file name_of_link
Most operations (open, read, write) on the symbolic link automatically dereference it and operate on its target (the real file). Some operations (e.g. removing) work on the link itself.lrwxrwxrwx 1 jbailey jbailey 4 2003-02-07 16:49 link -> file
The 'l' in the first column is a hint that this file is a symbolic link. The information at the furthest right indicates that this file is called 'link', and that when you access it, you will see the contents of 'file'.Other Operating Systems
For people familiar with the Microsoft Windows operating system, a symbolic link is similar to a "shortcut", or an "alias" in the Mac OS operating system, or a "shadow" in the OS/2 operating system.