Stop Typing Full Paths (You Are Wasting Hours)

The difference between a Junior and a Senior engineer isn’t code speed. It’s navigation speed. Here is why cd - is the most underrated command in history.

Last Updated: 2025-12-16 — Validator: OrionInsist

I watched a junior developer today, and it physically hurt.

He was debugging a config issue. He needed to switch between the log directory and the configuration directory. Every single time, he typed:

cd /var/www/html/project-phoenix/logs/nginx/

Then:

cd /etc/nginx/sites-available/

He did this twenty times in an hour.

I did the math. He typed ~45 characters per switch. That’s 900 keystrokes wasted on just moving. He wasn’t battling the bug; he was battling the filesystem.

I walked over, tapped his shoulder, and typed two characters:

cd -

He looked at me like I had just performed a magic trick. “How did you do that?”

The Absolute Trap

Most beginners learn Absolute Paths first. /home/orion/documents/scripts

It feels safe. It’s an anchor. No matter where you are, if you type the full path, you arrive at the destination. It’s like using a GPS to go from your kitchen to your living room by entering the full street address.

It works, but it’s slow.

The shell was designed in the 1970s. Bandwidth was low. Keystrokes were expensive. The creators didn’t design it for you to type paragraphs just to move a file.

Enter Relative Paths (The Pro Move)

Relative Paths depend on where you are. They require context. And context is what separates the tourists from the locals.

If I am in /var/www/html/, and I want to go to logs/, I don’t type the whole thing. I just type:

cd logs

“But Orion, that’s obvious.”

Is it? Then why do I see logs full of cp /home/user/file /home/user/backup?

The most powerful character in relative navigation is the dot:

  • . (Current Directory)
  • .. (Parent Directory)

Scenario: You downloaded a script to your Downloads folder, but you are currently in your project folder.

  • The Amateur: mv /home/orion/Downloads/script.sh /home/orion/dev/project/
  • The Pro: mv ~/Downloads/script.sh .

That single dot . at the end means “put it here.” It saves you from typing the destination path entirely.

The “Previous Channel” Button (cd -)

This is the hidden gem. The one command that changes everything.

cd - switches you to the previous directory you were in.

It works exactly like the “Previous Channel” button on a TV remote.

  1. You are in /deeply/nested/source/code/v2/
  2. You jump to /var/logs/ to check an error.
  3. You fixes the error.
  4. Type cd -.
  5. BOOM. You are back in /deeply/nested/source/code/v2/.

No history search. No re-typing.

Where Am I? (pwd)

There is a fear. “If I rely on relative paths, I’ll get lost.” That is why pwd (Print Working Directory) exists.

But here is the psychological shift:

  • GUI users look at icons to know where they are.
  • CLI users maintain a mental map of the structure.

When you force yourself to use relative paths (../..), you start visualizing the tree in your head. You stop seeing “folders” and start seeing “nodes.” You become part of the machine’s logic.

The 1-Hour Challenge

I challenge you. For the next hour of work:

  1. BANNED: You cannot start any directory path with / (unless you are cding to a completely different root system).
  2. REQUIRED: Use .. and . for everything.
  3. REQUIRED: Use cd - at least once.

It will feel awkward for 10 minutes. Then, you will feel the speed.

You aren’t just typing less. You are thinking faster.

📩 Don’t Miss The Next Crash

The terminal is only fast if you are fast. https://orioninsist.medium.com/subscribe

If you enjoyed this, check out my other articles on Linux Productivity in my profile.