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

KDE Mixer Master Mute/Unmute
arguably better than using the driver interface. lots of potentially cool stuff to be done w/ the dcop client.

This will allow you to browse web sites using "-dump" with elinks while you still are logged in
README: This require you to login on facebook with elinks without using '-dump' first time and when you have logged in you will then be able to dump all data from facebook without any advanced combos, dump is all you need for see all your friends newsfeed or whatever you wish to view in cli/terminal. Facebook is just an example, same requirements for all websites that have a login form.

Fix the vi zsh bindings on ubuntu
Use sed to comment out any up/down bindings in zsh

To print a specific line from a file
You can get one specific line during any procedure. Very interesting to be used when you know what line you want.

Use Kernighan & Ritchie coding style in C program

To create files with specific permission:

List only directories, one per line
omit the 1 (one) if you don't need one-per-line

Append stdout and stderr to a file, and print stderr to the screen [bash]
Useful for cron jobs -- all output will be logged but only errors will cause email to be sent. NB the order of "2>&1" and ">> logfile" is important, it doesn't work if you reverse them (everything goes to the logfile, nothing left for tee).

Reset hosed terminal,
stty sane resets the tty to basic usable function. The ^J is a newline -- sometimes CR/LF interpretation is broken so use the ^J explicitly.

Remove comments and empty lines from a conf file
Some conf file are very long (squid.conf) This command help to read it.


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: