commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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:
Will return the SSH server key information for each host you have in your ~/.ssh/known_hosts file, including key size, key fingerprint, key IP address or domain name, and key type.
Create a persistent remote Proxy server through an SSH channel.
This command will copy command's output into your local clipboard
When using tcpdump, specify -U option to prevent buffering.
This version transfers gzipped data which is unzipped as it arrives at the remote host.
It is an easy method unzip a file and copy it to remote machine. No unziped file on local hard drive
This command will download $file via server. I've used this when FTP was broken at the office and I needed to download some software packages.
Gets the latest podcast show from from your favorite Podcast. Uses curl and xmlstarlet.
Make sure you change out the items between brackets.
Ever wanted to stream your favorite podcast across the network, well now you can.
This command will parse the iTunes enabled podcast and stream the latest episode across the network through ssh encryption.
This will allow you to convert an audio file to wav format, and send it via ssh to a player on the other computer, which will open and play it there. Of course, substitute your information for the sound file and remote address
You do not have to use paplay on the remote end, as it is a PulseAudio thing. If the remote end uses ALSA, you should use aplay instead. If it uses OSS, you should berate them about having a lousy sound system. Also, you're not limited to transmitting encoded as wav either, it's just that AFAIK, most systems don't come with mp3 codecs, but will play wav files fine.
If you know SoX is installed on the remote end and has mp3 codecs, you can use the following instead:
cat Klaxon.mp3 |ssh [email protected] play -t mp3 -
this will transmit as mp3. Again, use your specific information. if you're not playing mp3s, use another type with the -t option
Protects your secret identity with a passphrase.
OSX 10.6 automatically does key forwarding and can store the passphrase in the keychain.
For other OSes, use ssh -A or set ForwardAgent in ssh_config to enable forwarding. Then use ssh-agent/ssh-add.