All commands (14,187)

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

Put terminal into vi mode
For if you want to use vi key bindings in the terminal

What is my public IP-address?
Very effective, use only DNS protocol. The @ part is optional if you already set opendns servers as default ns servers.

Remove trailing space in vi

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

see who's using DOM storage a/k/a Web Storage, super cookies
Someone over at Mozilla dot Org probably said, "I know, let's create a super-duper universal replacement for browser cookies that are persistent and even more creepy and then NOT give our browser users the tools they need to monitor, read, block or selectively remove them!" . This will let you see all the DOM object users in all your firefox profiles. Feel free to toss a `| sort -u` on the end to remove dupes. . I highly recommend you treat these as "session cookies" by scripting something that deletes this sqlite database during each firefox start-up. . note: does not do anything for so-called "flash cookies"

Indent a one-liner.
Bash builtin type also indents the function.

Dump audio from video without re-encoding.
This removes the video and subsequent file size and directly copies the audio.

Fetch the current human population of Earth
Fetches the world population JSON data from the US census and parses it uses jshon

wc in perl

Re-use the previous command output
The $(!!) will expand to the previous command output (by re-running the command), which becomes the parameter of the new command newcommand.


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: