/data/source and /backup/source.link are on different mounted filesystems.
Create a link from source.link that refers to source.
Which type can be used?
Hard links share an inode and cannot cross filesystem boundaries. Symbolic links store a path and can cross those boundaries.
Detailed explanation
Correct. A symbolic link can refer across mounted filesystem boundaries.
Correct. A symbolic link can refer across mounted filesystem boundaries.
Incorrect. A hard link cannot cross to another filesystem.
Incorrect. A hard link cannot cross to another filesystem.
Incorrect. Symbolic links make the cross-filesystem reference possible.
Incorrect. Symbolic links make the cross-filesystem reference possible.
Incorrect. Link count does not change the filesystem restriction for hard links.
Incorrect. Link count does not change the filesystem restriction for hard links.
Try it yourself
An example you can run in a temporary verification environment.
ln --helpExpected result
-sでsymbolic linkを作成する説明。hard linkの境界はlink(2)でEXDEVとして定義されるKey points
- Hard links stay on one filesystem
- Symbolic links can cross
- They refer to a path
Notes
- Environment: GNU coreutils 9.x/Linux
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.