DEV Community

Alex Spinov
Alex Spinov

Posted on

8 Terminal Commands That Make Me Look Like a Wizard to Non-Developers

My product manager once watched me work and said: "That's literally magic."

I was SSH'd into a server, piping logs through grep, sorting them, and generating a report — all in one line. She thought I was hacking the mainframe.

Here are the 8 commands that get the most "how did you do that" reactions from non-technical colleagues.


1. watch — Live-Updating Dashboard

watch -n 2 'curl -s https://api.github.com/repos/torvalds/linux | jq .stargazers_count'
Enter fullscreen mode Exit fullscreen mode

This refreshes every 2 seconds. I use it to monitor API responses, disk usage, or build status in real-time. Non-devs think it's a custom dashboard.


2. column -t — Instant Pretty Tables

echo -e "Name Score Grade\nAlice 95 A\nBob 82 B\nCharlie 91 A" | column -t
Enter fullscreen mode Exit fullscreen mode

Output:

Name     Score  Grade
Alice    95     A
Bob      82     B
Charlie  91     A
Enter fullscreen mode Exit fullscreen mode

Turn any messy output into a clean table. Pipe anything into it.


3. jq — JSON Surgery

curl -s https://api.github.com/users/torvalds | jq '{name, company, public_repos, followers}'
Enter fullscreen mode Exit fullscreen mode

Extracts exactly the fields you need from any JSON. I use this 20+ times a day.


4. xargs — Parallel Batch Processing

# Download 100 files in parallel (10 at a time)
cat urls.txt | xargs -P 10 -I {} curl -sO {}
Enter fullscreen mode Exit fullscreen mode
# Delete all .pyc files
find . -name '*.pyc' | xargs rm
Enter fullscreen mode Exit fullscreen mode

The silent workhorse that turns any list into parallel actions.


5. tee — Write Output to File AND Screen

python3 train_model.py 2>&1 | tee training.log
Enter fullscreen mode Exit fullscreen mode

See the output live AND save it to a file. Essential for long-running jobs.


6. diff <(cmd1) <(cmd2) — Compare Command Outputs

diff <(curl -s https://api.example.com/v1/users | jq .) <(curl -s https://api.example.com/v2/users | jq .)
Enter fullscreen mode Exit fullscreen mode

Compare two API responses, two config files, or two git branches without creating temp files.


7. awk '{print $NF}' — Extract the Last Column

# Get just the process names using the most memory
ps aux --sort=-%mem | head -10 | awk '{print $NF}'
Enter fullscreen mode Exit fullscreen mode

$NF means "last field." Works with any column-based output. When someone asks "what's using all the memory?" — I run this and have the answer in 2 seconds.


8. python3 -m http.server — Instant Web Server

# Share files from current directory on port 8000
python3 -m http.server 8000
Enter fullscreen mode Exit fullscreen mode

People are genuinely amazed when you type one command and their browser can download files from your computer. "Wait, you just created a website?!"


Bonus: chain them all

watch -n 5 'curl -s https://hacker-news.firebaseio.com/v0/topstories.json | python3 -c "import json,sys;[print(i) for i in json.load(sys.stdin)[:5]]" | xargs -I {} curl -s https://hacker-news.firebaseio.com/v0/item/{}.json | jq .title' | tee hn-live.log
Enter fullscreen mode Exit fullscreen mode

Live-updating Hacker News top 5 titles, saved to a log file. One line.


I write about developer productivity and build automation tools. If this was useful, follow for more.

What command makes YOUR coworkers think you're a wizard?


More from me: 10 Dev Tools I Use Daily | 77 Scrapers on a Schedule | 150+ Free APIs

Top comments (0)