Hard links and symbolic links in file systems

Linda Martinez
1 min readFeb 9, 2021
Hard links and symlinks in file system

Hard links

Hard links is a reference to a certain file; said reference to access the file, any change made to the file does not alter the functionality of the link, each link is generated with a name other than the original file; as well as a file can have several links in different locations. One aspect to consider is if the link is removed, it may cause the file to be deleted as well; for this reason, it is extremely important to previously verify the actions to be executed within the file systems.

Symbolic links

Symbolic links represent the reference or access of a file to another place within the file systems on both UNIX and GNU / Linux systems. One of the advantages of creating symbolic links to files is that if it is subsequently deleted, it does not affect the source file in any way; however if the source file is renamed or permissions change the symbolic link is broken and you can no longer access the source file.

The command to create hard and symbolic links is:

$ln

Example of creating a hard link:

$ln photo.png new_photo.png

Example of creating a symbolic link:

ln -s document.ods new_ document.ods

--

--

Linda Martinez

¡El Conocimiento nos hará Libres! Mis intereses: #SoftwareLibre #CulturaLibre #ConocimientoLibre #Educación #SocialMedia #eLearning #CommunityManagement y +