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

See a full list of compiler defined symbols
From http://lists.debian.org/debian-devel/2001/01/msg00971.html .

Make ls output better visible on dark terminals in bash
Sometimes you have a situation where you cannot properly see the ls output when you are using a terminal w/a dark background. Usually bash has ls aliased to use colors, and you can easily get ls to use the default foreground color via simply unaliasing the command.

Install pip with Proxy
Installs pip packages defining a proxy

search user defined function in c language

To print a specific line from a file
You can get one specific line during any procedure. Very interesting to be used when you know what line you want.

Kill multiple instances of a running process

Lists all listening ports together with the PID of the associated process
Lists all opened sockets (not only listeners), no DNS resolution (so it's fast), the process id and the user holding the socket. Previous samples were limiting to TCP too, this also lists UDP listeners.

Join lines split with backslash at the end
Joins each line that end with backslash (common way to mark line continuation in many languages) with the following one while removing the backslash.

find and grep Word docs
Find Word docs by filename in the current directory, convert each of them to plain text using antiword (taking care of spaces in filenames), then grep for a search term in the particular file. (Of course, it's better to save your data as plain text to make for easier grepping, but that's not always possible.) Requires antiword. Or you can modify it to use catdoc instead.

Learn the difference between single and double quotes


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: