Difference between revisions of "Create a Symlink"
From InfoTechPedia
TomHutchison (talk | contribs) (new page) |
TomHutchison (talk | contribs) (improving) |
||
Line 1: | Line 1: | ||
+ | The standard format is: <code>ln -s absolute_path_source_file absolute_path_target_file</code> | ||
+ | |||
To create a new symlink (will fail if symlink exists already): | To create a new symlink (will fail if symlink exists already): | ||
<pre> | <pre> | ||
− | admin@server:~$ ln -s / | + | admin@server:~$ ln -s /home/server/a_directory/file.ext /home/server/public_html/file.ext |
</pre> | </pre> | ||
Revision as of 17:56, 25 February 2018
The standard format is: ln -s absolute_path_source_file absolute_path_target_file
To create a new symlink (will fail if symlink exists already):
admin@server:~$ ln -s /home/server/a_directory/file.ext /home/server/public_html/file.ext
To create or update a symlink:
admin@server:~$ ln -sf /path/to/file /path/to/symlink