Using symbolic and hard links

With Linux, we can link files to other files, which gives us quite a bit of flexibility with how we can manage our data. Symbolic and hard links are very similar, but to explain them, you'll first need to understand the concept of inodes.

We already discussed inodes earlier in this chapter. But as a refresher, an inode is a data object that contains metadata regarding files within your filesystem. Inodes are represented by an integer number, which you can view with the -i option of the ls command. On my system, I created two files: file1 and file2. These files are inodes 543815 and 558287 respectively. You can see this output in the following screenshot where I run the ls -i command. This information will come in handy ...

Get Mastering Ubuntu Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.