ls -l

Notice that the number of hard links listed for firstlink and secondlinkfiles!inodes is 2.

echo "change" >> secondlink

This is another shell redirection trick (don’t worry about the details). You’ve appended the word “change” to secondlink. Confirm this with cat secondlink.

cat firstlink

firstlink also has the word “change” appended! That’s because firstlink and secondlink refer to the same file. It doesn’t matter what you call it when you change it.

chmod a+rwx firstlink

Changes permissions on firstlink. Enter the command ls -l to confirm that permissions on secondlink were also changed. This means that permissions information is stored in the inode, not in links.

rm firstlink

Deletes this link. This is a subtlety of rm. It really removes links, not files. Now type ls -l and notice that secondlink is still there. Also notice that the number of hard links for secondlink has been reduced to one.