Operations 9 min read

Boost Your Linux Productivity with 10 Essential Command‑Line Tools

This guide introduces ten lesser‑known Linux commands—including rsync, screen, lsof, vimdiff, netcat, and more—explaining their key options, practical use‑cases, and example invocations so you can work faster, automate tasks, and troubleshoot systems efficiently.

dbaplus Community
dbaplus Community
dbaplus Community
Boost Your Linux Productivity with 10 Essential Command‑Line Tools

rsync vs scp

While scp copies files over SSH, it always transfers the full file set; rsync copies only changed files, making it ideal for incremental backups. Example:

scp -Crvp -l 1024 logs/ root@remoteServer:/opt/logs

Options: -C (compress), -r (recursive), -p (preserve attributes), -l (limit bandwidth in KB/s), -v (verbose).

For incremental, bandwidth‑limited copies with exclusions:

rsync -prz --exclude 'bin' --bwlimit=1024 logs/ root@remoteServer:/opt/logs

Options: -r (recursive), -p (preserve), -z (compress), --bwlimit (bandwidth), --exclude (skip files), --progress (show progress).

screen & tmux

When you need multiple persistent terminal sessions, screen (pre‑installed on many distros) lets you detach and reattach sessions. A typical workflow:

# 1. Start a screen session and run a command
screen vim /etc/hosts
# 2. Detach with Ctrl‑a d
# 3. List sessions
screen -ls
# 4. Reattach a specific session
screen -r 14000
tmux

offers similar functionality with richer features but may require installation.

lsof

lsof

lists open files, which on Unix includes network sockets and device handles. Useful filters: -p – specify PIDs (e.g., lsof -p 123,456) -i tcp – list TCP connections -i :8080 – show processes using port 8080

python -m shortcuts

Python can launch a quick HTTP server without extra software: python3 -m http.server 9080 This serves the current directory on port 9080.

For JSON pretty‑printing, use the built‑in tool:

python -m json.tool < input.json

vimdiff

Vim can compare two files with colorized differences. Open both files: vim file1 file2 Navigation shortcuts: ]c – jump to next diff [c – jump to previous diff

netcat (nc)

nc

is a versatile networking utility. Example of a reverse shell listener:

# Server side
nc -l -vv -p 5879 -e /bin/bash

Client connects: nc -v 192.16.1.54 5879 To keep the listener alive after a client disconnects, add -k. Netcat can also test remote ports: nc -vvv baidu.com 443 And perform simple port scans:

nc -vzw 2 192.16.1.54 8888-9999

Converting Unix timestamps

Use date to turn a epoch value into a readable string: date -d @1658054000 '+%Y-%m-%d %H:%M:%S' On macOS the flag is -r instead of -d :

date -r 1658054000

systemctl service listing

To view all available services on a systemd host: systemctl -l -t service | less Mastering these commands can dramatically speed up everyday Linux tasks, reduce manual overhead, and give you finer control over remote systems.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linuxcommand-lineSystem Administrationrsyncscreenlsofnetcat
dbaplus Community
Written by

dbaplus Community

Enterprise-level professional community for Database, BigData, and AIOps. Daily original articles, weekly online tech talks, monthly offline salons, and quarterly XCOPS&DAMS conferences—delivered by industry experts.

0 followers
Reader feedback

How this landed with the community

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.