5 Handy Linux Terminal Scripts to Boost Your Productivity
This article showcases five useful Linux terminal scripts—including a persistent date display, remote‑local file comparison, SSHFS directory mounting, an in‑terminal world map, and a quick uninstall command—each explained with commands, usage tips, and screenshots.
Linux excels at command‑line efficiency, allowing scripts to replace many GUI actions. Below are five practical scripts and commands that illustrate this power.
1. Keep the date constantly visible in the terminal
When working in full‑screen mode, the current date and time may disappear. The following one‑liner continuously updates the top‑right corner with the date:
while sleep 1; do tput sc; tput cup 0 $(($(tput cols)-38)); date; tput rc; done &The script runs in the background, refreshing every second.
2. Compare a remote file with a local file without downloading
Use SSH to stream the remote file directly into diff:
ssh user@host cat /path/to/remotefile | diff -y /path/to/localfile -The dash ( -) tells diff to read from standard input.
3. Mount a remote directory locally with sshfs
First install the tool (Debian/Ubuntu example): sudo apt install sshfs Then mount the remote folder:
sshfs name@server:/path/to/folder /path/to/mount/pointAfter mounting, the remote files appear in the local directory and can be browsed graphically. To unmount:
fusermount -u ~/test/x4. Show a world map inside the terminal
Using the mapscii.me service, a simple telnet displays an interactive map: telnet mapscii.me Use arrow keys to scroll, a / z (or mouse wheel) to zoom, and q to quit.
5. Final thoughts
These snippets demonstrate how a few commands can streamline daily Linux work. Readers are encouraged to share their own favorite scripts.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
