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

Show word-by-word differences between two latex files, in color

ls -hog --> a more compact ls -l
I often deal with long file names and the 'ls -l' command leaves very little room for file names. An alternative is to use the -h -o and -g flags (or together, -hog). * The -h flag produces human-readable file size (e.g. 91K instead of 92728) * The -o suppresses the owner column * The -g suppresses the group column Since I use to alias ll='ls -l', I now do alias ll='ls -hog'

Check if running in an X session
If you want to display a dialog (using xdialog/kdialog/zenity) you need to make sure that you have a valid X session. Checks for the existence of the DISPLAY variable.

Files extension change
Changing a file extension to a new one for all files in a directory.

to see about php configure
see about php install configure

Git Tree Command with color and tag/branch name

Run a command on a remote machine
This counts the number of httpd processes running.

Recursively Add Changed Files to Subversion
Extracted from http://www.howtogeek.com/wiki/Recursively_Add_Changed_Files_to_Subversion

replace XX by YY in the the current directory and cd to it. ( in ZSH )
If you are in /begin/path/with/XX/pattern cd XX YY will change your current directory to /begin/path/with/YY/pattern in ZSH

repeat a command every one second
Short method of "while x=0; do foo ; sleep 1 ; done"


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: