Check These Out
This command is more portable than it's cousin netstat. It works well on all the BSDs, GNU/Linux, AIX and Mac OS X. You won't find lsof by default on Solaris or HPUX by default, but packages exist around the web for installation, if needed, and the command works as shown. This is the most portable command I can find that lists listening ports and their associated pid.
I often use it to find recently added ou removed device, or using find in /dev, or anything similar.
Just run the command, plug the device, and wait to see him and only him
Looks up a word on merriam-webster.com, does a screen scrape for the FIRST audio pronunciation and plays it.
USAGE: Put this one-liner into a shell script (e.g., ~/bin/pronounce) and run it from the command line giving it the word to say:
$ pronounce lek
If the word isn't found in merriam-webster, no audio is played and the script returns an error value. However, M-W is a fairly complete dictionary (better than howjsay.com which won't let you hear how to pronounce naughty words).
ASSUMPTIONS: GNU's sed (which supports -r for extended regular expressions) and Linux's aplay. Aplay can be replaced by any program that can play .WAV files from stdin.
KNOWN BUGS: only the FIRST pronunciation is played, which is problematic if you wanted a particular form (plural, adjectival, etc) of the word. For example, if you run this:
$ pronounce onomatopoetic
you'll hear a voice saying "onomatopoeia".
Playing the correct form of the word is possible, but doing so might make the screen scraper even more fragile than it already is. (The slightest change to the format of m-w.com could break it).
No need for grep, let awk do the match. This will not behave properly if the filenames contains whitespace, which is awk's default field separator.
This command prints the Date (Not time) from 3 days ago (72 hours ago).
This works on systems without GNU date (MacOSX , Solaris, FreeBSD).
rename is a really powerfull to, as its name suggests, rename files
Usage:
$ sftp-cp * | sftp user@host:/dir
This is useful if there is a process on the remote machine waiting for files in an incoming directory. This way it won't see half-transmitted files if it ignores hidden files.