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

Send data securly over the net.
Using OpenSSL we can encrypt any input we wish and then use Netcat to create a socket which can be connected to from an externally source (even using a Web Browser)

Display any tcp connections to apache
Sometimes apache will get stuck in an established state where you can't get a list of the connecting IP's from mod_status... not a good thing when you need to ban an abusive ip.

Rename files in batch

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

Search specified $TEXT1 and Replace that by specified arg ($TEXT2)

Show the command line for a PID, converting nulls to spaces and a newline
If you cat the file, all the parts of the command line are bunched up. If you use tr to convert the nulls to spaces, you're still left without a newline unless you add another step. This command does everything for you.

for newbies, how to get one line info about all /bin programs
Get simple description on each file from /bin dir, in list form, usefull for newbies.

Remove all subversion files from a project recursively
This command will remove all .svn folder from your project if you need to manual remove the subversion files.

Visit wikileaks.com
Who needs a DNS server

Find files that are older than x days
Find files that are older than x days in the working directory and list them. This will recurse all the sub-directories inside the working directory. By changing the value for -mtime, you can adjust the time and by replacing the ls command with, say, rm, you can remove those files if you wish to.


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: