Hey everyone 👋
If you're learning to code, manage servers, or just want to feel like a terminal ninja, you'll eventually need to do more than just look at files — you'll need to manipulate them. That means copying, moving, renaming, or deleting files and folders — and doing it fast.
I just finished the Manipulation module of the Codecademy command-line course, and let me tell you — this stuff makes you feel powerful 💪
Here’s a breakdown of what I learned, explained the way I wish someone had told me early on 👇
🧰 Think of It Like Managing a Warehouse
Imagine your computer as a giant digital warehouse 🏭
- Each file is a box.
- Each folder (directory) is a room.
- The command line is your forklift 🛻
You’re not dragging and dropping with a mouse — you’re issuing instructions like a boss:
“Move these two boxes to that room. Now delete the ones labeled ‘junk.’”
📋 The Core File Commands I Learned
Let’s run through the key tools — each one does something simple, but when combined, they’re unstoppable.
📂 cp — Copy Files (or Entire Stacks of Them)
Copy a single file:
cp source.txt destination.txt
➡️ Makes a duplicate.
Great for backups or creating template files.
Copy into a folder:
cp resume.txt job_apps/
Copy and rename at the same time:
cp resume.txt job_apps/resume_2025.txt
Copy multiple files:
cp file1.txt file2.txt my_folder/
Use wildcards for batch copy:
cp *.txt text_files/
🚚 mv — Move or Rename Files
Move files like you’re relocating inventory:
mv draft.txt archive/
Rename files:
mv draft.txt final.txt
Move multiple files at once:
mv a.txt b.txt c.txt folder/
🗑️ rm — Delete with Caution (Seriously)
Delete a file:
rm badfile.txt
Deletes a file.
No Recycle Bin. No “Are you sure?” Just gone.
Delete entire folders and their contents:
rm -r old_logs/
Want a safety net? Use interactive mode:
rm -i filename
It will ask for confirmation before deleting.
🃏 Wildcards — Your Command Line Superpower
Use the * symbol to target multiple files:
Pattern Matches...
.txt All .txt files
backup Files starting with backup
data Files with "data" in the name
Example:
cp backup*.txt archive/
Boom — done. 🔥
💥 Combining Commands = Efficiency
The real power comes when you chain commands:
cp *.log backup/
mv backup/*.log archive/
rm -r backup/
You’ve just performed copy ➡️ move ➡️ cleanup in seconds.
🧩 Final Thoughts
This module taught me that the command line isn’t just about navigating around — it’s about commanding your computer with clarity and speed.
By mastering:
- cp to duplicate
- mv to move or rename
- rm to delete
- and * wildcards to target like a sniper
… you can automate and manage files like a pro — whether you’re building web projects, managing logs, or setting up production servers.
Learning this stuff made me feel 10x more confident in the terminal — and I'm just getting started.
Are you learning the command line too? Got questions or tips? Let’s connect LinkedIn — I’d love to swap notes and war stories from the terminal world 🧠💬
Top comments (0)