5 Linux Commands You’ve Probably Never Heard Of
In this article, I will show you five Linux commands you’ve probably never heard of. They’re simple, practical, and designed to make your life easier.
Whether you want faster file searches, safer deletions, or just clearer man pages, these commands/tools have your back. Let’s dive in!
Simpler Man Pages (tldr)
Have you ever typed man tar, stared at the massive wall of text, and thought, “I just want to know how to extract a file…”?
You’re not alone. That’s where tldr comes in — tldr stands for “Too Long; Didn’t Read.” It’s a command-line tool that gives you short, practical examples of how to use other commands.
Instead of wading through a sea of flags and options in the man pages, tldr shows you the stuff you actually need.
How to Use It
Open your Linux terminal and type:
tldr [command]
For example:
tldr tar
And instead of overwhelming you, it gives you short examples on how to use the command:
Create a .tar archive
tar cf archive.tar file1 file2
Extract a .tar.gz archive
tar xzf archive.tar.gz
List contents of a tar file
tar tf archive.tar
Here you can see clear examples of how to use “tar”. man pages are great for deep dives. But if you just want to get things done quickly, tldr is your new best friend.
Automatically Stop Long-Running Commands
The timeout command lets you run a command for a specific amount of time. If the time runs out, the timeout will kill the command, so your terminal (script) doesn’t sit there frozen forever.
Example: Stop a Ping Process
timeout 5s ping google.com
This command pings Google, but only for 5 seconds, then automatically stops. Duration can be in seconds (5s), minutes (2m), hours (1h), or days (1d).
Limit a Script’s Runtime
timeout 30s ./myscript.sh
If myscript.sh doesn’t finish in 30 seconds, it gets terminated.
The timeout command it’s simple, powerful, and once you get used to it, you’ll start putting it into all kinds of scripts and tasks.
Disk Usage (ncdu)
The ncdu tool is like du, but with a text-based, interactive interface that makes it easy to explore your disk usage and delete junk on the spot. It’s fast and user-friendly, even inside the terminal.
How to Use It
In your terminal, just type:
ncdu
This will scan your current directory and show you a navigable list of where all the disk space is going. After a quick scan, you’ll see something like this:
— /home/user ------------------------
. 3.1 GiB [##########] Downloads
1.2 GiB [###…] Videos
800.0 MiB [##…] Projects
450.0 MiB [#…] Documents
…
Use the arrow key to move up and down, and press Enter to go inside a folder. Also, you can delete files or folders right from the ncdu interface.
Analyze a Specific Folder
ncdu /path/to/project
The command ncdu /path/to/project scans the folder you specify and shows you exactly how much space each file and subfolder is using.
A Fast Way to Find Files
The classic find command is powerful, but its syntax feels like something from the ’80s. Every time you use it, you’re googling “how do I find files by name again?”
That’s where fd comes in, fd is a user-friendly alternative to find, built with simple syntax (no more long flags or weird patterns). Think of it as “find without the headache.”
How to Use It
To find all files named notes.txt, type:
fd notes.txt
Way easier than:
find . -name notes.txt
Search for all .py files
fd -e py
Finds files like main.py, script.py, etc.
Search Inside a Specific Folder
fd config /etc
Finds files in /etc with “config” in the name.
fd is simpler, faster, and way more fun to use, whether you’re looking for logs, scripts, or random forgotten files in your system.
Safer File Deletion
If you’ve ever typed rm too quickly and deleted the wrong file (or worse, an entire folder), you know how brutal Linux can be about file deletion. There’s no “undo” button. Once it’s gone, it’s really gone.
That’s where the trash command comes in. It works just like rm, but instead of permanently deleting files, it sends them to your Trash/Recycle Bin, where they can be easily recovered later.
Send a File to the Trash
trash filename.txt
This removes the file just like rm, but it’s now safely in your trash can.
Trash Multiple Files
trash file1.txt file2.txt folder/
This is useful for deleting multiple files.
Restore a File
trash-restore
This will walk you through a list of deleted files and let you pick one to recover.
Bottom Line
So there you have it, five Linux commands you might’ve never heard of, but will absolutely make your life easier. Try them out and see how much easier your workflow can be.
Thank you!
