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

Determine if a port is open with bash
For times when netcat isn't available. Will throw a Connection refused message if a port is closed. Scriptable: $ (: /dev/null && echo "OPEN" || echo "CLOSED"

ANSI Terminal Color Test using python
Pre-packaged python script that comes with Debian/Ubuntu.

url shortner using google's shortner api
First get a api key for google url shortner from here https://developers.google.com/url-shortener/ Then replace the API_KEY in the command

read manpage of a unix command as pdf in preview (Os X)

Install Restricted Multimedia Codecs in Ubuntu 14.04
Install the unrestricted version of libavcodec . It will keep away from any issues or missing codecs in video editors or transcoders. Install unrestricted version of libavcodec by the command.

create a progress bar...
A simple way yo do a progress bar like wget.

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

suspend to ram without root
$dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend

Get the full path to a file
Part of coreutils - so needs no extra package...

Copy the text from the 3rd line to the 9th line into a new file with VI


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: