gui@Latitude:~$ cd playground
gui@Latitude:~/playground$ ls -l
total 8
drwxrwxr-x 2 gut gut 4096 set 20 16:18 dir1
-rw-r--r-- 1 gut gut 2903 set 20 14:46 gato
gui@Latitude:~/playground $ ln gato gato-rato
gui@Latitude:~/playground $ ls -l
total 12
drwxrwxr-x 2 gui gui 4096 set 20 16:18 dir1
-rw-r--r-- 2 gui gui 2903 set 20 14:46 gato
-rw-r--r-- 2 gui gui 2903 set 20 14:46 gato-rato
gui@Latitude:~/playground $
Please clarify this for me:
drwxrwxr-x 2 gut gut 4096 set 20 16:18 dir1
👆🏼 dir1
has 2 hard links, right? : .
inside the dir1
, and dir1
?
rw-r--r-- 1 gui gui 2903 set 20 14:46 gato
At the start, this one has one 👆🏼 has one link, right? (hard link?)
-rw-r--r-- 2 gui gui 2903 set 20 14:46 gato-rato
I have created the hard link gato-rato
. Now, there are 2 links for gato
and 2 for gato-rato
, which I find confusing.
Is this because there are 2 links for both now? That’s: gato
gato rato
and gato-rato
gato
.