Check These Out
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
tstouch takes two arguments: a filename containing a timestamp, and an extended regular expression with the parenthesized section matching a timestamp of the form YYYYMMDDhhmm or YYYYMMDDhhmm.ss.
It then touches the file with that timestamp.
Converts any number of seconds into days, hours, minutes and seconds.
sec2dhms() {
declare -i SS="$1"
D=$(( SS / 86400 ))
H=$(( SS % 86400 / 3600 ))
M=$(( SS % 3600 / 60 ))
S=$(( SS % 60 ))
[ "$D" -gt 0 ] && echo -n "${D}:"
[ "$H" -gt 0 ] && printf "%02g:" "$H"
printf "%02g:%02g\n" "$M" "$S"
}
Einstein's razor: As simple as possible, but not simpler.
On the destination machine netcat listens on any port (1234 in the example) and sends anything it receives into a file or pipe. On the source machine a separate netcat takes input from a file or pipe and sends it over the network to the listener.
This is great between machines on a LAN where you don't care about authentication, encryption, or compression and I would recommend it for being simpler than anything else in this situation. Over the internet you should use something with better security.
Instead of looking for the right ip address, just pick whatever address you like and set a static ip mapping.
Put it in your ~/.bashrc
usage:
google word1 word2 word3...
google '"this search gets quoted"'
See the summary.
Grab a list of MP3s (with full path) out of Firefox's cache
Ever gone to a site that has an MP3 embedded into a pesky flash player, but no download link? Well, this one-liner will yank the *full path* of those tunes straight out of FF's cache in a clean list.
Shorter and Intuitive version of the command submitted by (TuxOtaku)
Uses the shell builtin `declare` with the '-f' flag to output only functions to grep out only the function names.
You can use it as an alias or function like so:
alias shfunctions="builtin declare -f | command grep --color=never -E '^[a-zA-Z_]+\ \(\)'"
shfunctions () { builtin declare -f | command grep --color=never -E '^[a-zA-Z_]+\ \(\)'; }