Commands tagged bandwidth (7)

  • The command copies a file from remote SSH host on port 8322 with bandwidth limit 100KB/sec; --progress shows a progress bar --partial turns partial download on; thus, you can resume the process if something goes wrong --bwlimit limits bandwidth by specified KB/sec --ipv4 selects IPv4 as preferred I find it useful to create the following alias: alias myscp='rsync --progress --partial --rsh="ssh -p 8322" --bwlimit=100 --ipv4' in ~/.bash_aliases, ~/.bash_profile, ~/.bash_login or ~/.bashrc where appropriate. Show Sample Output

    rsync --progress --partial --rsh="ssh -p 8322" --bwlimit=100 --ipv4 .
    ruslan · 2011-02-10 14:25:22 2
  • Limits the usage of bandwidth by apt-get, in the example the command will use 30Kb/s ;) It should work for most apt-get actions (install, update, upgrade, dist-upgrade, etc.)

    sudo apt-get -o Acquire::http::Dl-Limit=30 upgrade
    alemani · 2010-03-22 01:29:44 1
  • the command is obvious, I know, but maybe not everyone knows that using the parameter "-l" you can limit the use of bandwidth command scp. In this example fetch all files from the directory zutaniddu and I copy them locally using only 10 Kbs

    scp -l10 pippo@serverciccio:/home/zutaniddu/* .
    0disse0 · 2010-02-19 16:44:24 1
  • On the machine acting like a server, run: iperf -s On the machine acting like a client, run: iperf -c where is the ip or hostname of the server. Show Sample Output

    iperf -s
    forcefsck · 2011-01-24 07:58:38 1
  • Nethogs groups bandwidth by process. Show Sample Output

    sudo nethogs eth0
    totti · 2013-01-25 08:20:44 2
  • in Debian-based systems apt-get could be limited to the specified bandwidth in kilobytes using the apt configuration options(man 5 apt.conf, man apt-get). I'd quote man 5 apt.conf: "The used bandwidth can be limited with Acquire::http::Dl-Limit which accepts integer values in kilobyte. The default value is 0 which deactivates the limit and tries uses as much as possible of the bandwidth..." "HTTPS URIs. Cache-control, Timeout, AllowRedirect, Dl-Limit and proxy options are the same as for http..."

    sudo apt-get -o Acquire::http::Dl-Limit=20 -o Acquire::https::Dl-Limit=20 upgrade -y
    ruslan · 2011-02-14 05:24:49 0
  • Trickle is here: Trickle is a simple bandwidth limiter

    trickle sudo apt-get update -y
    mrman · 2011-02-15 02:05:37 0

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Check These Out

convert video format to youtube flv format

Uniquely (sort of) color text so you can see changes
Colorify colors input by converting the text to a number and then performing modulo 7 on it. This resulting number is used as the color escape code. This can be used to color the results of commands with complex outputs (like "482279054165371") so if any of the digits change, there's a good chance the color will change too. I say good chance because there's only 7 unique colors here, so assuming you were watching random numbers, there would be a 6/7 chance that the color would change when the number changed. This should really only be used to help quickly identify when things change, but should not be the only thing relied upon to positively assert that an output has not changed.

Create a script of the last executed command
Sometimes commands are long, but useful, so it's helpful to be able to make them permanent without having to retype them. An alternative could use the history command, and a cut/sed line that works on your platform. $history -1 | cut -c 7- >

Who has the most Apache connections.
This will tell you who has the most Apache connections by IP (replace IPHERE with the actual IP you wish to check). Or if you wish, remove | grep -c IPHERE for the full list.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Retrieve "last modified" timestamp of web resource in UTC seconds
This command line assumes that "${url}" is the URL of the web resource. It can be useful to check the "freshness" of a download URL before a GET request.

Clear terminal Screen
Probably the quickest / easiest way to clear the screen.

Convert spaces in file names to underscores

Count lines of code across multiple file types, sorted by least amount of code to greatest
Gives you a nice quick summary of how many lines each of your files is comprised of. (In this example, we just check .c, .h, .php and .pl). Since we just use wc -l to count, you'll just get a very rough estimate of how many lines of actual code there are. Use a more sophisticated algorithm instead if you need to.

Doing some floating point calculations with rounding (e.g. at the 3rd decimal)

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: