original and alias are hard links to one regular file, with link count 2.
Run rm original while alias remains.
What is the resulting state?
Removing a hard link unlinks one name from the inode. If another hard link remains, the data remains accessible through that name.
Detailed explanation
Incorrect. The inode and data remain while another link refers to them.
Incorrect. The inode and data remain while another link refers to them.
Correct. Only the original name is removed; alias still reaches the data.
Correct. Only the original name is removed; alias still reaches the data.
Incorrect. The remaining link is not automatically renamed.
Incorrect. The remaining link is not automatically renamed.
Incorrect. A hard link does not become a symbolic link.
Incorrect. A hard link does not become a symbolic link.
Try it yourself
An example you can run in a temporary verification environment.
stat --format=%h FILEExpected result
FILEのハードリンク数を表示するKey points
- A name is unlinked
- The link count decreases
- The remaining name stays valid
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.