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

bash shell expansion
The expansion {,} in bash will repeat the given string once for each item seperated by commas. The given command will result in the following being run: cp /really/long/path/and/file/name /really/long/path/and/file/name-`date -I` These can be embedded as needed, ex: rm file{1,2,3{1,2,3}} would delete the files file1, file2, file31, file32, file32, and no other files.

Display GCC Predefined Macros
doesn't need /dev/null

Copy ssh keys to user@host to enable password-less ssh logins.
To generate the keys use the command ssh-keygen

convert plain .avi movies to .mpeg
works "out of the box" on ubuntu 8.10

Find C/C++ source files
Find C/C++ source files and headers in the current directory.

List the size (in human readable form) of all sub folders from the current location

Download all default installed apk files from your android.

return external ip

Display a list of all PHP classes that are called statically
Searches all .php files for a static instantiation of a class and displays the class names along with their frequencies.

separate (emphasize) digital strings from other text


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: