Check These Out
You can use this one-liner for a quick and dirty (more customizable) alternative to the watch command. The keys to making this work: everything exists in an infinite loop; the loop starts with a clear; the loop ends with a sleep. Enter whatever you'd like to keep an eye on in the middle.
Clears the "arp" table, without entering manually addresses (tested in Ubuntu).
Replace all instances of "A" with "B" in file "source" saved as file "destination".
!! IF A/B is multi-byte, then separate bytes with spaces like so: "s/20\ 0A/00/g".
This shell snippet reads a single keypress from stdin and stores it in the $KEY variable.
You do NOT have to press the enter key!
The key is NOT echoed to stdout!
This is useful for implementing simple text menus in scripts and similar things.
The above command will send 4GB of data from one host to the next over the network, without consuming any unnecessary disk on either the client nor the host. This is a quick and dirty way to benchmark network speed without wasting any time or disk space.
Of course, change the byte size and count as necessary.
This command also doesn't rely on any extra 3rd party utilities, as dd, ssh, cat, /dev/zero and /dev/null are installed on all major Unix-like operating systems.
Use flag "--" to stop switch parsing
On the another machine write this command.
pv -r /dev/zero | nc 192.168.1.1 7777
It will show live throughput between two machine.The destination machine ip is at our example 192.168.1.1
You must multiply by 8 for the network calculation.
You must install pv and netcat commands for this commands usage.
kerim@bayner.com
http://www.bayner.com/
Remove the "echo" to actually archive.
Many similar commands are found on commandlinefu but I end up needing this very specific one from time to time.
To extract any of them, use the standard tar.bz2 extract command:
$tar xvjf folder1.tar.bz2
This will copy a file from your current directory to the same location on another machine. Handy for configuring ha, copying your resolv.conf, .bashrc, anything in /usr/local, etc.