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

Get File Names from touch commands
retrieve file names back from touch commands for them

disable history for current shell session
this will cause any commands that you have executed in the current shell session to not be written in your bash_history file upon logout

Cut/Copy everything arround brackets or parentheses on vim (in normal mode)
Put the cursor on either curly braces ( {, } ). Then press d% The d is delete command, and % is movement command that move the cursor to another matching parentheses (or curly braces in this case). This action will delete every character that was on the way of the movement (from the first curly braces to the second).

Change your timezone

for newbies, how to get one line info about all /bin programs
Get simple description on each file from /bin dir, in list form, usefull for newbies.

Display the human-readable sizes of all files and folders in the current directory with 3 decimal places
To sort the list by file/directory size, insert `sort -n |` before `awk`.

Using numsum to sum a column of numbers.
if you, like me, do not have the numsum, this way can do the same.

Retrieve a random command from the commandlinefu.com API
Seeing that we get back plain text anyway we don't need lynx. Also the sed-part removes the credit line.

Are the two lines anagrams?
This is just a slight alternative that wraps all of #7917 in a function that can be executed

Extract a IRC like chat log out of an Adium xml logfile


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: