All commands (14,184)

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

import a new set of files located in a local directory into a remote Subversion repository

Sort netflow packet capture
Sort netflow packet capture by unique connections excluding source port.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Welcome humans!
Some information about robots. :-)

Mount a partition from dd disk image
Assuming we have a disk image, ie. created by $dd if=/dev/sda of=image.dd we can check the image's partition layout with $fdisk -ul image.dd then, we substitute "x" with starting sector of the partition we want to mount. This example assumes that the disk uses 512 B sectors

Get your external IP address if your machine has a DNS entry
Easy way to see your real external IP

add all files not under version control to repository
With the force options the same results can be achieved

Get the size of all the directories in current directory (Sorted Human Readable)
This allows the output to be sorted from largest to smallest in human readable format.

grep certain file types recursively

Zip each file in a directory individually with the original file name
This will list the files in a directory, then zip each one with the original filename individually. video1.wmv -> video1.zip video2.wmv -> video2.zip This was for zipping up large amounts of video files for upload on a Windows machine.


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: