DOCUMENT ID: 1334-02 SYNOPSIS: When to use a symbolic link in lieu of a link OS RELEASE: 2.1, 2.4, 2.5 PRODUCT: Solaris KEYWORDS: symbolic link DESCRIPTION: The decision to use a symbolic link is not always clear. A review of link attributes may clear the air. A normal link must be within the same filesystem, as the mechanism is to make a directory entry using a common inode number between the real file and the link file. A symbolic link is a special file containing the text of a path to another file within the same file system or another file system. The inode number of the original can be changed without invalidating the link. An example might be: Failing case: touch file_b ln file_b file_a ls -i file* 52708 file_a 52708 file_b mv file_b file_b.save touch file_b ls -i file* 52708 file_a 52714 file_b 52708_b.save Good case: touch file_b ln -s file_b file_a ls -li file* 52714 lrwxrwxrwx 1 user staff 6 Mon dd 199x file_a -> file_b 52708 -rw-r--r-- 1 user staff 0 Mon dd 199x file_b mv file_b file_b.save touch file_b ls -li file* 52714 lrwxrwxrwx 1 user staff 6 Mon dd 199x file_a -> file_b 52777 -rw-r--r-- 1 user staff 0 Mon dd 199x file_b 52708 -rw-r--r-- 1 user staff 0 Mon dd 199x file_b.save Accessing file_a will always yield data in file_b DATE APPROVED: 05/08/95