What could be the reason for this?

Creating a hard link to an ordinary file returns an error. What could be the reason for this?

Creating a hard link to an ordinary file returns an error. What could be the reason for this?

A.
The source file is hidden.

B.
The source file is read-only.

C.
The source file is a shell script.

D.
The source file is already a hard link.

E.
The source and the target are on different filesystems.



Leave a Reply 1

Your email address will not be published. Required fields are marked *


James Gastovski

James Gastovski

Hardlinks require source and destination to be on the same file system. Softlinks (or Symlinks or Symbolic Links) can jump over the filesystems.

Hardlinks refers to INODES on disks, so deleting the source file doesnt delete the actual data on disk, the link created by the hardlink can still access the data even if its located on a different directory in the same file system.

Softlinks refers to the actual file, deleting the source link will make the softlink also unusable.