Linux Tutorial Series

Linux Tutorial Series – 140 – Links – what are those?

Here is the video version, if you prefer it:

Let’s talk about links – what are those anyway?

Link is a pointer to a file or a directory. If you are not a programmer, a pointer is exactly what its name says it is – it is used for pointing to something. Let’s look at the following situation:

mislav@mislavovo-racunalo:~/Linux_folder$ ls -l

total 36

-rw-r--r-- 1 mislav mislav 8 Feb 5 23:09 1264.txt

-rw-r--r-- 1 mislav mislav 8 Feb 5 23:06 1-4.txt~

-rw-r--r-- 1 mislav mislav 8 Feb 5 23:06 2345.txt

The number in the second column (after file permissions) is the link count. Why is this link count number equal to 1 for these files? Because the only link that exists at this time is the link which is pointing from Linux_folder to the file.

You can increase the number of links to a file and there are two types of links – only one type of link increases the link count. But that’s a topic for another article.

Thank you for reading and hope you learned something useful!

NewsletterUpdates on interesting things I am doing

Subscribe to my newsletter to keep abreast of the interesting things I'm doing. I will send you the newsletter only when there is something interesting. This means 0% spam, 100% interesting content.

Leave a Reply

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