Recall & Review
beginner
What is a hard link in Linux?
A hard link is a directory entry that associates a name with a file on the same filesystem. It points directly to the file's data (inode), so multiple names can refer to the same content.
Click to reveal answer
beginner
What is a symbolic (soft) link in Linux?
A symbolic link is a special file that points to another file or directory by name. It acts like a shortcut and can cross filesystem boundaries.
Click to reveal answer
beginner
Command to create a hard link named 'linkfile' to 'originalfile'?
Use:
ln originalfile linkfile. This creates a hard link named 'linkfile' pointing to the same data as 'originalfile'.Click to reveal answer
beginner
Command to create a symbolic link named 'symlink' to 'targetfile'?
Use:
ln -s targetfile symlink. This creates a symbolic link named 'symlink' pointing to 'targetfile'.Click to reveal answer
intermediate
Difference between hard and symbolic links?
Hard links point directly to file data and must be on the same filesystem. Symbolic links point to file names and can cross filesystems. Deleting the original file breaks symbolic links but not hard links.
Click to reveal answer
Which command creates a symbolic link?
✗ Incorrect
The '-s' option with 'ln' creates a symbolic link.
What happens if you delete the original file of a hard link?
✗ Incorrect
Hard links point to the same data, so deleting one name does not remove the data if other hard links exist.
Can hard links point to directories?
✗ Incorrect
Most systems prevent creating hard links to directories to avoid filesystem loops.
Which type of link can cross filesystem boundaries?
✗ Incorrect
Symbolic links point to file names and can link across different filesystems.
What does the command 'ls -l' show for a symbolic link?
✗ Incorrect
'ls -l' shows symbolic links with an arrow pointing to their target.
Explain how hard links and symbolic links differ in Linux.
Think about what each link points to and what happens if the original file is removed.
You got /5 concepts.
Describe the commands to create hard and symbolic links and when you would use each.
Recall the syntax and practical use cases for each link type.
You got /5 concepts.