Sometimes it’s helpful to create a shortcut to a file. For example, you may want to keep a configuration file in an easy-to-access location, but a piece of software expects to find that file in a specific location. You can use links to create shortcuts to files.

In Out of Space with Free Space Left, you learned about inodes, which are data structures that hold information about filesystem objects such as files and directories. Each inode stores the location of the object’s data on the disk, as well as information like the last modification date and file permissions.

When you create a file, you’re creating a link to an inode. Create a new file named greetings.txt that contains some text:

 $ ​​echo​​ ​​"Hi there!"​​ ​​

Get Small, Sharp Software Tools 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.