Linking is an interesting feature in Linux. In UNIX-like operating systems, everything is a file. A file is fundamentally a link to an inode, a special type of data structure that stores everything about a certain file except its original name and actual contents.This is the feature that links leverages. To create a link is to create another file that points to the same underlying inode as another file. In many situations, it's an incredibly useful method.
Check out how to create hard links in Linux.
Hard links in Linux
Before diving deeper, let's talk a bit about hard and soft links. There are some fundamental differences between them. In the case of a hard link, it can only exist in the same filesystem, while the symbolic link will persist cross-filesystems. Moreover, it can only be performed on regular files. You also can't create directory hard links, so it doesn't create a directory loop.
If one file of the hard link is deleted, it removes the link from the underlying inode.
The ls command can print the inode of a target file/directory.
$ ls -li
Creating hard links
Generating a hard link is quite simple. To create links, ln is the dedicated tool available in almost all Linux distros.
Use the following command structure to create a hard link. Note that the destination should be within the same filesystem. The “-v” flag is for verbose mode.
I recently read about the Microsoft Sculpt Touch wireless mouse and decided to buy it. After using it for a while, I decided to share my experience wi...
Tablet users often miss the mouse pointer, especially when they are habitual to using the laptops. The touchscreen Smartphones and tablets come with m...
The middle mouse button helps you scroll through long webpages and screens with a lot of data. If that stops, well you will end up using the keyboard ...