File Management «Prev  Next»
Lesson 6 Creating a link to a file
Objective Create symbolic links using ln -s.

Creating a link to file in Unix


Create a symbolic link


ls -l


The following diagram shows how to create and list symbolic links:
symbolic links
  1. This command simply displays the directory contents before you create the link
  2. This command takes the first file name, project/qa/test_plan.html and creates a symbolic link to it. The link will be named qa.html.
  3. The directory now contains a symbolic link named qa.html. The -F option appends an character to help identify the link.
  4. The ls -l output uses an arrow (->) to reveal the actual file, which the qa.html link points to. Note the access mode. The file type field, the leftmost character, shows the letter l, which stands for link.

Working with Symbolic Links