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

Manipulate the metadata and edit the create time (This will change date to 1986:11:05 12:00 - Date: 1986 5th November, Time: 12.00) and then it will set modify date to the same as alldate.

Find the package that installed a command

Get list of servers with a specific port open
Change the -p argument for the port number. See "man nmap" for different ways to specify address ranges.

Number of files in a SVN Repository
This command will output the total number of files in a SVN Repository.

Sum columns from CSV column $COL
More of the same but with more elaborate perl-fu :-)

Open Vim with two windows
: new command allow to split a Vim screen in two separate windows. Each window can handle its own buffer. Passing the -c new options when Vim start cause to split screen automatically.

print all network interfaces' names and IPv4 addresses
ifconfig can't properly display interface's name longer 9 symbols,also it can't show IPs added thru ip command, so 'ip' should be used instead. This alias properly shows long names, bond interfaces and all interface aliases. loopback interface is ignored, since its IP is obvious

Count items in JSON array
Pipe any JSON to jq, then count with the appropiate expression and use the | length on the array

sort lines by length

redirect stdout and stderr each to separate files and print both to the screen


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: