Check whether data and data.backup are hard links.
ls -li shows the same inode number for both names.
Which description is correct?
Hard links are separate directory entries referring to one inode. ls -i or stat can reveal the shared inode number.
Detailed explanation
Incorrect. Equal contents alone would not prove a shared inode, but the identical inode number does.
Incorrect. A symbolic link has its own inode and would not simply be identified this way.
Correct. Both names are hard links to the same inode.
Incorrect. Editing through either hard-link name changes the same underlying data.
Try it yourself
An example you can run in a temporary verification environment.
ls -liExpected result
各名前のinode番号を先頭列に表示するKey points
- The inode number matches
- Ownership and mode are shared
- The names are equal references
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.