Ln creates a hard link to the file (for example, file a, create a hard link file b, for example, ln a b). At this time, the contents of a and b files are the same, and the changes will change,

Deleting file a and file b will not be affected [Supplement: hard links can only create files, not directories. You can never create files across partitions. They can only be used on the same mount point]

Ln - s Creates a soft link. No matter whether you are a directory, a file, or the same mount point, you can set soft links. It is equivalent to the shortcut of the win system,

For example, if you want to create a b file soft link for a file, you can use ln - s a b file. In this case, b file is a shortcut to a file, and the contents of both files are the same.

If file a is deleted, file b will report an error and cannot be opened. [It does not affect like hard links

Was this answer helpful? 0 Users Found This Useful (0 Votes)