brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: wget --limit-rate keeps a big download from eating all your bandwidth

CLI
~/tips/tip-wget-limit-rate

wget --limit-rate=2m https://example.com/big-file.iso

Cap the speed of a wget download so the rest of the network stays usable.

A large download on a shared connection can make everything else crawl. I’d rather give it a speed limit.

--limit-rate takes a number of bytes per second, with k for kilobytes and m for megabytes:

wget --limit-rate=2m https://example.com/big-file.iso

So --limit-rate=20k limits the rate to 20 KB/s. Decimals are allowed, as in 2.5k. Add -c to resume a partly downloaded file after an interruption.

A caveat: wget doesn’t limit the line itself. It sleeps after each network read that was faster than allowed, so the speed settles at roughly the rate you asked for, and it can take a moment to get there.

Further reading: wget man page (Debian)

More CLI tips printf 'GET /\r\n' | hexdump -C hexdump -C -s 512 -n 64 disk.img wget --spider https://example.com/file.zip rg 'apiKey' -g '!*.min.js' -g '!package-lock.json' yt-dlp --download-archive archive.txt "https://www.youtube.com/playlist?list=PLAYLIST_ID" All CLI tips (46) All topics

Link