Linux Today: Linux News On Internet Time.

More on LinuxToday

Softlinks vs. Hardlinks: A Quick Explanation

Sep 27, 2010, 17:34 (1 Talkback[s])


Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers

"I got this question in an email the other day, and I realized it's something many people might be unfamiliar with. In Linux, there are two types of file links, hardlinks and softlinks. Here, I'll give a quick explanation of what these types of links are, and when you should use them.

"What is a softlink?

"Softlinks are the easiest to understand, especially because you've probably already used them. A softlink fills the same role as a Windows shortcut. Simply put, a softlink is a file that points to another file. When you create a softlink, you are creating a new file that exists only as a pointer to a file elsewhere on the system.

"All links are created with the ln command, using the -s flag if you want a softlink (if you don't use -s, you'll get a hardlink, which I'll talk about in a second). The syntax of the command is:"

Complete Story

Related Stories: