You can create either hard links or symbolic links. Symbolic links are sometimes called soft links or symlinks.
Because hard links have limitations
, most people use symbolic links, which will be described in this lesson.
To create a symbolic link, use the
command with the
option. It has the following form:
% ln -s filename linkname
The filename can be a regular file or a directory. In directory listings, a symbolic link looks just like a regular file unless you use
to directory names. Well, with
also appends an at sign (
) to the names of symbolic links.
To determine the actual location to which the link points, use
You can unintentionally break a symbolic link if you rename or delete the item that a symbolic link points to.
The link will no longer point to anything.
In the next lesson, the find command to search for files will be discussed.