brokensword emptybottle portalmirror@ scrappile/ crystalhint
The Scrap Heap is a wasteland of discarded objects β broken swords, empty potion bottles, shattered mirrors. But hidden among the junk are portal mirrors, and learning ln -s lets you build instant teleportation.
πΉοΈ Play This Chamber¶
This page is your walkthrough and strategy guide β play right here in the browser, then follow the steps below.
{% include bashcrawl-terminal.html room="Scrap Heap" %}
π― Quest Objectives¶
- Understand the difference between hard links and symbolic links
- Create a symbolic link with
ln -s - Identify symlinks with
ls -l(look for->) - Resolve the target of a symlink with
readlink - Use the scrap's portal symlinks to shortcut navigation
- Collect the portal crystal
πΊοΈ Quest Prerequisites¶
- Cellar side-quest complete
- Comfortable with
ls -F,ls -l, andcd
β‘ Command Cheatsheet¶
| Command | What It Does |
|---|---|
ln -s target link_name |
Create a symbolic link pointing to target |
ls -l |
Long listing β symlinks show link -> target |
ls -F |
Symlinks show with @ marker |
readlink link_name |
Print the target of a symlink |
readlink -f link_name |
Print the fully-resolved absolute path |
realpath path |
Same as readlink -f (more modern) |
Note:
readlink -fandrealpathare GNU-only β they ship with Linux but not with stock macOS. macOS adventurers may need to install GNU coreutils (e.g.brew install coreutils, thengreadlink/grealpath) to wield them.
Hard Link vs Symbolic Link¶
| Property | Hard Link | Symbolic Link |
|---|---|---|
| Points to | Inode (data) | Path (name) |
| Works across filesystems | No | Yes |
| Target deleted | Link still works | Broken link (dangling) |
ls -F marker |
none | @ |
πΊοΈ Walkthrough¶
Step 1 β Survey the scrap heap¶
ls -F
# broken_sword empty_bottle portal_mirror@ scrap_pile/ crystal_hint
ls -l portal_mirror
# lrwxrwxrwx 1 user group 10 Jan 01 portal_mirror -> /vault/lab
portal_mirror is already a symlink β the bashcrawl game pre-creates it for you, so there's no need to build it yourself. It points to the vault's lab, so you can cd portal_mirror and you will land directly in the lab.
Step 2 β Navigate via the existing portal¶
cd portal_mirror
pwd
# .../vault/lab β teleported!
cd - # Return to previous directory (the scrap heap)
pwd
# .../scrap
cd - takes you back to wherever you were last. Very useful.
Step 3 β Read the hint¶
Step 4 β Create your own portal¶
ln -s ../../ENTRANCE quick_entrance
ls -l quick_entrance
# lrwxrwxrwx 1 user group 14 Jan 01 quick_entrance -> ../../ENTRANCE
# (a symlink's size is the length of its target path β "../../ENTRANCE" is 14 characters)
ls -F quick_entrance/
# scroll cellar/ β entrance contents, via symlink
Step 5 β Inspect and resolve¶
readlink quick_entrance
# ../../ENTRANCE
readlink -f quick_entrance
# /home/user/bashcrawl/ENTRANCE β absolute, resolved path
Step 6 β Collect the crystal¶
Building your quick_entrance portal and stepping through it is what earns the portal crystal β the act of creating and using the symlink is the puzzle. Then check your haul with inventory, a bashcrawl game command (not a standard Unix tool) that lists the treasures you've gathered:
cd quick_entrance # step through the portal you built
pwd # now inside ENTRANCE, reached via your symlink
cd - # return to the scrap heap
inventory
# portal crystal β
π‘ Common Pitfalls¶
| Problem | Cause | Fix |
|---|---|---|
| Symlink shows broken (red in terminal) | Target path does not exist | Check relative path with readlink |
ln -s with no arguments |
Wrong order | Syntax: ln -s TARGET LINK_NAME |
cd symlink goes somewhere unexpected |
Relative path off | Use absolute path or readlink -f |
| Cannot delete directory via symlink | Symlink vs directory | rm symlink removes the link; rm -r symlink/ (trailing slash) follows the link and deletes the target's contents |
Danger:
rm -r symlink_to_dir(no trailing slash) removes only the symlink itself, leaving the target untouched. But add a trailing slash βrm -r symlink_to_dir/β andrmfollows the link into the target directory and wipes out its contents. The slash is the difference between deleting a shortcut and deleting what it points at. Preferunlink symlink_nameto safely remove only the link.
β Validation¶
- You know the difference between
ls -F @and a real directory - You created
quick_entranceand successfullycd'd through it - You can resolve absolute target paths with
readlink -f - The portal crystal is in your inventory
β‘οΈ Next Steps¶
- Complete other branches β Hidden Chapel Β· Vault
- Enter the final gauntlet β The Rift
- Back to hub β Bashcrawl Hub
{% include bashcrawl-play-local.html %}
π External Resources¶
Continue your terminal adventure with these resources:
- Bashcrawl Web Demo β Play in your browser, no installation required
- Bashcrawl on GitHub β Source code, setup, and open contributions
- GNU Bash Manual β Symbolic Links β Portal magic for brave adventurers
- IT-Journey Bashcrawl Hub β Full quest series and walkthroughs
- Linux Symlinks Guide β Master the art of magical portals
Portals created. The dungeon's geography bends to your will. ποΈ
πΈοΈ Knowledge Graph¶
Structured wiki-links connect this quest to the IT-Journey knowledge graph. Open the Obsidian Graph View to explore connections.
Level hub: [[Level 0000 - Foundation & Init World]] Overworld: [[π° Overworld - Master Quest Map]] Prerequisites: [[Bashcrawl Cellar: File Types, Aliases, and Emerald Amulet]] Unlocks: [[Bashcrawl Rift: Pipes, Redirection, and the Final Boss]] Sequel quests: [[Bashcrawl Rift: Pipes, Redirection, and the Final Boss]] Obsidian docs: [[Obsidian Knowledge Graph and Wiki Links]]