Commands by Dark006 (2)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.

Share Your Commands


Check These Out

grep for minus (-) sign
Use flag "--" to stop switch parsing

Delicious search with human readable output
You can install filterous with $ sudo apt-get install libxslt1-dev; sudo easy_install -U filterous

generate a unique and secure password for every website that you login to
usage: sitepass MaStErPaSsWoRd example.com description: An admittedly excessive amount of hashing, but this will give you a pretty secure password, It also eliminates repeated characters and deletes itself from your command history. tr '!-~' 'P-~!-O' # this bit is rot47, kinda like rot13 but more nerdy rev # this avoids the first few bytes of gzip payload, and the magic bytes.

Get Cisco network information
This gives you lots of nifty Cisco network information like VLAN tag, port and switch information.

Find public IP when behind a random router (also see description)
Depends on GET. You can also replace GET with curl, or `wget -qO -` if GET isn't available.

add files to existing growable DVD using growisofs
replace "directory name with files to add to DVD" with actual directory containing files you want to add to growable DVD

Getting GnuPG Public Keys From KeyServer
get my GPG-key from pgp.surfnet.nl, key id is 19886493.

Lists architecture of installed RPMs
Lists all installed RPM packages with name and architecture, which is useful to check for compability packages (+ required i386 packages) on a 64bit system.

Get and read log from remote host (works with log on pipe, too)

Decode base64-encoded file in one line of Perl
Another option is openssl.


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: