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

sort lines by length
making it "sound" more "natural" language like -- additionally sorting the longest words alphabetically: this approach is using: * to get at all lines of input * post-"for" structure * short-circuit-or in sort: if the lengths are the same, then sort alphabetically otherwise don't even evaluate the right hand side of the or * -C sets all input and ouput channels to utf8

Fake system time before running a command
Fake system time before running any command.

Get all shellcode on binary file from objdump
Tired copy paste to get opcode from objdump huh ? Get more @ http://gunslingerc0de.wordpress.com

exec chmod to subfiles
Using `-exec cmd {} +` causes find to build the command using all matching filenames before execution, rather than once per file.

Create an SSH tunnel for accessing your remote MySQL database with a local port

Syntax Highlight your Perl code
This uses Text::Highlight to output the specified Perl file with syntax highlighting. A better alternative is my App::perlhl - find it on the CPAN: http://p3rl.org/App::perlhl

Command to Show a List of Special Characters for bash prompt (PS1)
I use this command (PS1) to show a list bash prompt's special characters. I tested it against A flavor of Red Hat Linux and Mac OS X

Wrap text files on the command-line for easy reading
fold wraps text at 80 characters wide, and with the -s flag, only causes wrapping to occur between words rather than through them.

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

Remove security limitations from PDF documents using ghostscript (for Windows)
#4345 also works under windows


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: