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

Change a specific value in a path
Awk replaces the value of a specific field while retaining the field separator "/" .

Randomize lines (opposite of | sort)
random(6) - random lines from a file or random numbers

Convert JSON to YAML (unicode safe)
If you tried the other Python version of Convert JSON to YAML and you end up with lines that has "!!python/unicode", this version of the command is for you.

check web server port 80 response header

Run iMacros from terminal
Run iMacros from terminal

Retry the previous command until it exits successfully

Write on the console without being registered
just use a space to prevent commands from being recorded in bash's history on most systems

Copies currently played song in Audacious to selected directory
Maybe it could work for any music player if you change "audacious2" with the string you see in `ps aux` for your player. Needs testing in different systems.

Parallel file downloading with wget
xargs can be used in this manner to download multiple files at a time, and xargs will in this case run 10 processes at a time and initiate a new one when the number running falls below 10.

Terminal Keyboard Shortcut list
This command will give you a list of available keyboard shortcuts according to stty.


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: