Linux Basics

63 / 87
   

Files & Directories: linking

If you want to give multiple names to a single file without copying the content, you can create the link.

  1. Create a file:

    nano orig_text
    
  2. Put the following text in it:

    This is my valuable data
    
  3. Save and Exit: Press CTRL+x and y

  4. Check if the file has right data:

    cat orig_text
    
  5. Create Link:

    ln orig_text mylink
    
  6. Check if it is there:

    ls -l mylink