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

Selecting a random file/folder of a folder
Also looks in subfolders

Have an ssh session open forever
Open a ssh session opened forever, great on laptops losing Internet connectivity when switching WIFI spots.

Get the 10 biggest files/folders for the current direcotry

Rename files in batch

find system's indianness

convert hex to decimal ; decimal to hex

Swap the two last arguments of the current command line
Say you just typed a long command like this: $ rsync -navupogz --delete /long/path/to/dir_a /very/long/path/to/dir_b but you really want to sync dir_b to dir_a. Instead of rewriting all the command line, just type followed by , and your command line will read $ rsync -navupogz --delete /very/long/path/to/dir_b /long/path/to/dir_a

let a cow tell you your fortune

shell equivalent of a boss button
Nobody wants the boss to notice when you're slacking off. This will fill your shell with random data, parts of it highlighted. Note that 'highlight' is the Perl module App::highlight, not "a universal sourcecode to formatted text converter." You'll also need Term::ANSIColor.

Testing php configuration
Run the function phpinfo() on the shell


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: