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

Collect a lot of icons from /usr/share/icons (may overwrite some, and complain a bit)
In other way of xargs, only with find -exec

detect partitions
Shows all block devices in a tree with descruptions of what they are.

see the TIME_WAIT and ESTABLISHED nums of the network
see the TIME_WAIT and ESTABLISHED nums of the network

Sort the size usage of a directory tree by gigabytes, kilobytes, megabytes, then bytes.
Since coreutils 7.6 provides sort -h

ssh autocomplete
Autocomplete from .ssh/config

Sort the current buffer in vi or vim.
vim 7 or higher has internal sort, too 'sort n' for numbers

print line and execute it in BASH
!# is the currennt line so far, by using !#:- you can go from the second arg (it's zero indexed) to the last ($) (did I understand the problem correctly?)

Live filter a log file using grep and show x# of lines above and below

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

change user & preserver environment (.bashrc&co)


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: