
If you use the terminal often whether you're coding, managing servers, or just exploring Linux, these commands can save you time and effort.
Here are 10 lesser-known but super useful commands (with quick examples):
- xargs – Runs a command using input from another.
find . -name "*.log" | xargs rm
The above example shows how you can delete all files with .log in the current folder and subfolders.
- tac – Like cat, but shows lines in reverse order. It comes in handy if you are debugging something and want to see the logs from latest to oldest.
tac app.log
- yes – Repeats a word or answer continuously unless interrupted/stopped.
yes | sudo apt install something
Automatically confirms every prompt during installation.
- column – Makes output look like a table.
cat data.txt | column -t
Great for making messy data easier to read and align.
- nl – Adds line numbers to a file.
nl script.sh
Makes it easier to reference specific lines while editing or debugging.
- stat – Shows metadata about a file.
stat file.txt
Displays file details like size, permissions, and timestamps.
- shuf – Shuffles lines randomly.
shuf names.txt | head -n 3
Picks 3 random entries from a list. Useful for sampling data or users.
- watch – Repeats a command at regular intervals.
watch -n 2 date
Refreshes the output every 2 seconds. Great for monitoring anything live.
- pv – Shows progress of data through a pipeline.
pv bigfile.zip | tar xzf -
Displays a progress bar while extracting or transferring large files.
- btop / htop – Advanced system monitors.
btop
Provides a real-time view of CPU, memory, and running processes in a clean UI.
These tools may not be the most popular, but once you start using them, you’ll definitely notice the difference in productivity.