Search This Blog


Linking Files in Linux

Even after working with linking for a while sometimes these concepts confuse me or I get them backwards.

Here's some easy ways to remember what linking types mean and how to read the commands

Symbolic Links

The way I think of symbolic links is best described by an example:


The above is the format of it

Here is a practical example:

ln -s /fruit/apples/ /food/apples

Which in plain english means: When you look for food that is an apple under the /food/apples directory, instead look inside and use the /fruit/apples/ directory

The /food/apples directory is the symbolic link which can be removed using:

rm /food/apples

This effectively allows us to use the "fruit" storage instead of the "food" storage which is useful if the "food" storage is limited but the fruit storage is plentiful.

No comments:

Post a Comment