Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the hueman domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/CloudIngenium.com/htdocs/wp-includes/functions.php on line 6114
How to: Add or Remove Symbolic links in Ubuntu – Knowledge eXchange

How to: Add or Remove Symbolic links in Ubuntu

How to: Add or Remove Symbolic links in Ubuntu

Unlike Windows, in Linux based systems symbolic links are use quite frequently. The advantage of using symbolic links is that they allow you to have the same file in multiple locations, but the content to remain the same across all of them regardless of where you changed the file. For example, Apache or NginX use symbolic links to enable sites from a repository of web sites available. By adding a symbolic link you can enable a site while by removing it you can disable it. This is extremely useful as it solves the issue of keeping track of updates to files that should be the same.

With that in mind here are the two main operations you need to remember when using symbolic links:

I. Use ln to create a symbolic link like this:

ln -s /usr/SourcePath/SourceFile /usr/DestinationPath/DestinationFile

II. Use unlink to remove a previously created symbolic link like this:

unlink /usr/DestinationPath/DestinationFile

 Note the use of -s in the ln command to indicate a soft link. Hard links will link to a specific version of the file and therefore it would appear as if their content is not updated when the source file’s is.

I recommend reading the man pages for ln and unlink if you want to learn more about what you can do with them.

Enhanced by Zemanta

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.