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

Diff XML files
Diffs two xml files by formatting them first using xmllint and then invoking diff. Usage: diffxml XMLFile1 XMLFile2

Install pip with Proxy
Installs pip packages defining a proxy

Mortality Countdown
watch the seconds of your life tick away - replace YYYY-mm-dd HH:MM:ss w/ your birthtime.

Add your public SSH key to a server in one command
Just run the command, type your password, and that's the last time you need to enter your password for that server. This assumes that the server supports publickey authentication. Also, the permissions on your home dir are 755, and the permissions on your .ssh dir are 700 (local and remote).

ssh autocomplete
Add to your bash profile to minimize carpal tunnel syndrome. Doesn't work with user@hostname but appending "-l user" works fine if needed. Works for ping as well.. complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ping

Copy a file using pv and watch its progress
pv allows a user to see the progress of data through a pipeline, by giving information such as time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA. (man pv)

LIST FILENAMES OF FILES CREATED TODAY IN CURRENT DIRECTORY
Then pipe to 'xargs ls' for a familiar listing, possibly using find's -print0 and xarg's -0 options.

strips the first field of each line where the delimiter is the first ascii character

concatenate avi files
concatenates avi files

Make less act like cat if its input's contents can fit on one 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: