Challenge - 5 Problems
Link Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of this command sequence?
You create a file and then a hard link to it. What does
ls -li show for the inode numbers?Linux CLI
echo 'hello' > file1
ln file1 file2
ls -li file1 file2Attempts:
2 left
💡 Hint
Hard links share the same inode because they point to the same file data.
✗ Incorrect
Hard links point to the same inode, so both file1 and file2 share the same inode number.
💻 Command Output
intermediate2:00remaining
What happens when you delete the original file of a symbolic link?
You create a symbolic link to a file, then delete the original file. What does
cat symlink output?Linux CLI
echo 'data' > original
ln -s original symlink
rm original
cat symlinkAttempts:
2 left
💡 Hint
Symbolic links point to a path, not the file content directly.
✗ Incorrect
After deleting the original file, the symbolic link points to a non-existent file, causing an error.
📝 Syntax
advanced2:00remaining
Which command correctly creates a symbolic link named
link to /usr/bin/python3?Choose the correct syntax to create a symbolic link named
link pointing to /usr/bin/python3.Attempts:
2 left
💡 Hint
The syntax is: ln -s target link_name
✗ Incorrect
The correct syntax places the target first, then the link name, with -s option before them.
🚀 Application
advanced2:00remaining
How to create a hard link to a file on a different filesystem?
You want to create a hard link to a file located on a different mounted filesystem. What will happen if you try?
Linux CLI
ln /mnt/usb/file.txt ./file_link
Attempts:
2 left
💡 Hint
Hard links cannot span different filesystems.
✗ Incorrect
Hard links must be on the same filesystem; otherwise, the command fails with an error.
🧠 Conceptual
expert3:00remaining
What is the difference in inode link count after creating a symbolic link vs a hard link?
You have a file with inode link count 1. You create a symbolic link and a hard link to it. What are the inode link counts for the original file after each link creation?
Attempts:
2 left
💡 Hint
Inode link count counts hard links only.
✗ Incorrect
Hard links increase the inode's link count because they point to the same inode; symbolic links are separate files with their own inodes.