Commands by proudzhu (1)

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

Compute the numeric sum of a file
In the file data.txt there is a single column of numbers. Sed adds a "+" between lines and xargs prepares the output for bc. The "echo 0" is to avoid to have a "+" at the beginning of the line.

copy with progress bar - rsync
-r for recursive (if you want to copy entire directories) src for the source file (or wildcards) dst for the destination --progress to show a progress bar

Install pip with Proxy
Installs pip packages defining a proxy

Send remote command output to your local clipboard
This command will copy command's output into your local clipboard

Don't like the cut command? Tired of typing awk '{print $xxx}', try this

Batch convert PNG to JPEG
Convert all PNG images in directory to JPEG using ImageMagick, and delete the old PNG images.

copy hybrid iso images to USB key for booting from it, progress bar and remaining time are displayed while copying

Display your ${PATH}, one directory per line
This works in bash and zsh. You may also want to alias it, if you need to look at it often... $ alias lpath="echo \$PATH | tr : \\\\n" "\$PATH" to make sure to look at your current $PATH

connect to X login screen via vnc
the $15 may change for you depending on your distro, etc...

Watch Network Service Activity in Real-time


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: