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

Go (cd) directly into a new temp folder
This command create a new temp directory using mktemp (to avoid collisions) and change the current working directory to the created directory.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Use lynx to run repeating website actions
This command will tell lynx to read keystrokes from the specified file - which can be used in a cronjob to auto-login on websites that give you points for logging in once a day *cough cough* (which is why I used -accept_all_cookies). For creating your keystroke file, use: $ lynx -cmd_log yourfile

Automatically download Ubuntu 10.04 when available
Tested with 9.10 release. Choose whatever torrent client you prefer.

Show sorted list of files with sizes more than 1MB in the current dir
Taken from here: http://linsovet.com/directory-usage-size-sorted-list

List the size (in human readable form) of all sub folders from the current location
Simple and easy to remember. -h is human, -d1 = depth 1. disk usage, human, depth 1

quickly backup or copy a file with bash

Top 10 Memory Processes
It displays the top 10 processes sorted by memory usage

Recompress all .gz files in current directory using bzip2 running 1 job per CPU core in parallel

set desktop background to highest-rated image from Reddit /r/wallpapers
You'll need "feh" to set the background from the commandline. Install with "apt-get install feh" Thanks to the Redditors on this thread: http://www.reddit.com/r/linux/comments/bira4/is_there_a_linux_version_of_this_preferably_a/


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: