curl -C - resumes downloads, but if the server ignores Range it exits with code 0 and leaves a truncated file — check Accept-Ranges first, then verify the result.
Blog
CliAI blog
Latest news, deep dives and how-tos around the CliAI ecosystem.
-
2026-06-29
Resume an interrupted curl download without corrupting it
-
2026-06-27
Check SSL certificate expiration with openssl
Get a certificate's exact expiry date, turn it into a day count, run a pass/fail check for cron, and scan a whole list of domains — all with plain openssl.
-
2026-06-24
Resize All Images in a Folder from the Command Line
magick mogrify -resize 800x800 *.png resizes every image in a folder in one command — but it overwrites the originals, so work on a copy first.
-
2026-06-22
How to Measure API Response Time with curl
curl's -w flag splits response time into DNS, connect, TLS, and TTFB — one total number hides which stage is slow, and only the gaps between stages tell you why.
-
2026-06-20
journalctl logs for a service in the last hour
journalctl -u nginx --since '1 hour ago' shows one service's logs from the last hour; add -p err for only errors or -f to follow them live.
-
2026-06-17
Tail multiple log files at once
Use tail -n +1 for headers, tail -f to follow in real time, but always use tail -F after log rotation — it reopens the file while -f keeps staring at the old inode and goes silent forever.
-
2026-06-15
Extract tar.gz, zip, or 7z on Linux with one command
tar -xf archive.tar.gz extracts tar, tar.gz, tar.bz2, tar.xz, and tar.zst without any flag — modern tar detects the compression from the file itself.
-
2026-06-13
Find duplicate files on the Linux command line
md5sum and uniq find duplicate files by content with zero packages installed: count groups, skip small files, and know when to actually install fdupes.
-
2026-06-10
Check if a port is open on a remote server
Connection refused means nobody's listening, silence means a firewall, and a service bound to 127.0.0.1 explains the rest — here's how nc, nmap, and ss tell the three apart.
-
2026-06-08
Grep recursively while excluding a directory
--exclude-dir only works with -r, matches bare directory names instead of paths, and needs brace expansion for more than one — the full recipe, plus when to switch to ripgrep.
-
2026-06-06
Is It Safe to Let AI Run Terminal Commands?
Short answer: yes, if you read the command and confirm before it runs — no, if the model's output goes straight into your shell. Here's the threat model.
-
2026-06-03
Compress a video to MP4 with ffmpeg
ffmpeg -i in.mp4 -c:v libx264 -crf 28 -preset fast out.mp4 shrinks a video with barely any visible quality loss — CRF 18-28 is the range that actually matters.