Check These Out
grep -o puts each occurrence in a separate line
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.
This example will close the pipe after transferring 100MB at a speed of 3MB per second.
Enhanced version: fixes sorting by human readable numbers, and filters out non MB or GB entries that have a G or an M in their name.
Send microphone audio to another computer using netcat and arecord.
Connect to the stream using "nc [other ip] 3333|aplay"
You can set up two-way communication by piping audio the reverse direction on another port:
Machine #1:
$arecord -D hw:0,0 -f S16_LE -c2|nc -l 3333 &;nc -l 3334|aplay
Machine #2:
$$ip=[machine1_ip];arecord -D hw:0,0 -f S16_LE -c2|nc $ip 3334 &;nc $ip 3333|aplay
slashdot.org webserver adds an X-Bender or X-Fry HTTP header to every response!
Written for Mac OSX. When you are working in a project and want to open it on Github.com, just type "gh" and your default browser will open with the repo you are in. Works for submodules, and repo's that you don't own.
You'll need to copy / paste this command into a gh.sh file, then create an alias in your bash or zsh profile to the gh.sh script. Detailed instructions here if you still need help:
http://gist.github.com/1917716
This command works by rsyncing the target directory (containing the files you want to delete) with an empty directory. The '--delete' switch instructs rsync to remove files that are not present in the source directory. Since there are no files there, all the files will be deleted.
I'm not clear on why it's faster than 'find -delete', but it is.
Benchmarks here: https://web.archive.org/web/20130929001850/http://linuxnote.net/jianingy/en/linux/a-fast-way-to-remove-huge-number-of-files.html