Post

sym links

Sym links are “symbolic” links. Its a symbolic link to a real file or folder. The symbolic part is just a representation of a file, not a real file.

  1. Move your file or folder to its new location
  2. Create your symbolic link to the file

This is good for security because you can set more lineant permissions on the symbolic file

ln Stands for link -s Stands for symbolic

Here we create a new symbolic link in the current directory to /path-to-file/

1
ln -s /path-to-file/ name-of-symbolic-file

examples

1
sudo ln -s /var/www/test.eample.site/ my-link 
1
sudo ln -s /var/www/test.example.site/web/ my-link 
1
ln -s [target file or directory] [symlink name]

Example

1
ln -s /path/to/file /path/to/symlink
1
ls -l
1
find /path/to/search -xtype l
1
rm symlink_name
This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.