Operations 8 min read

5 Lesser‑Known Linux Commands That Will Supercharge Your Workflow

Discover five handy Linux command‑line tools—tldr, timeout, ncdu, fd, and trash—that simplify manual pages, limit command execution time, visualize disk usage, speed up file searches, and provide safer deletion, helping you work faster and more confidently.

Code Mala Tang
Code Mala Tang
Code Mala Tang
5 Lesser‑Known Linux Commands That Will Supercharge Your Workflow

Today we introduce five Linux commands you may have never heard of. They are simple, practical tools designed to make everyday tasks easier.

Whether you want to locate files faster, delete files more safely, or view manual pages more clearly, these utilities can help you. Let’s get started!

Simplify manual pages (tldr)

Ever typed man tar and been overwhelmed by a wall of text, thinking, “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 is a command‑line tool that provides concise, practical examples for other commands.

Instead of scrolling through exhaustive options, tldr shows only what you really need.

How to use

Open your Linux terminal and type:

<code>tldr [command]</code>

For example:

<code>tldr tar</code>

It returns a short example of how to use the command:

<code># 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</code>

Manual pages are great for deep dives, but if you just need a quick solution, tldr is your best friend.

Automatically stop long‑running commands

The timeout command lets you run another command for a specific duration. When the time expires, timeout terminates the command so your terminal or script doesn’t hang.

Example: stop a ping process

<code>timeout 5s ping google.com</code>

This sends ping requests to Google for only 5 seconds, then stops automatically. The time can be specified in seconds (5s), minutes (2m), hours (1h), or days (1d).

Limit script execution time

<code>timeout 30s ./myscript.sh</code>

If myscript.sh does not finish within 30 seconds, it will be terminated.

The timeout command is simple yet powerful; once you get used to it, you’ll start using it in many scripts and tasks.

Disk usage analysis (ncdu)

The ncdu tool is similar to du but provides a text‑based interactive interface, allowing you to explore disk usage and delete junk files on the spot. It is fast and user‑friendly, even inside a terminal.

How to use

In the terminal type:

<code>ncdu</code>

It scans the current directory and shows a navigable list of where space is being used. After a quick scan you’ll see something like:

<code>--- /home/user ------------------------
 .  3.1 GiB [##########] Downloads
    1.2 GiB [###.......] Videos
    800.0 MiB [##........] Projects
    450.0 MiB [#.........] Documents
    ...</code>

Use the arrow keys to move, press Enter to enter a folder, or delete files/folders directly from the ncdu interface.

Analyze a specific folder

<code>ncdu /path/to/project</code>

This scans the specified folder and shows the space used by each file and sub‑folder.

Fast file search (fd)

The classic find command is powerful but its syntax feels ancient. fd is a user‑friendly replacement with a simple syntax—think of it as “find without the headache”.

How to use

To find all files named notes.txt , run:

<code>fd notes.txt</code>

Much simpler than:

<code>find . -name notes.txt</code>

Find all .py files

<code>fd -e py</code>

This will locate files such as main.py , script.py , etc.

Search within a specific directory

<code>fd config /etc</code>

This finds files in /etc whose names contain “config”. fd is simpler, faster, and more fun for locating logs, scripts, or forgotten system files.

Safer file deletion

If you’ve ever typed rm and accidentally removed the wrong file or folder, you know Linux offers no “undo”. The trash command provides the same functionality as rm but moves files to the recycle bin, allowing easy recovery.

Send a file to the recycle bin

<code>trash filename.txt</code>

It removes the file like rm but places it safely in your trash.

Delete multiple files

<code>trash file1.txt file2.txt folder/</code>

This works for deleting several files at once.

Restore a file

<code>trash-restore</code>

It guides you through a list of deleted files so you can choose one to restore.

Summary

These five lesser‑known Linux commands—tldr, timeout, ncdu, fd, and trash—can dramatically simplify your workflow. Give them a try and see how much smoother your daily tasks become.

Linuxproductivitycommand linefdncdutldrtrash
Code Mala Tang
Written by

Code Mala Tang

Read source code together, write articles together, and enjoy spicy hot pot together.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.