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

tcpdump whole packets to file in ascii and hex with ip adresses instead of hostname

Chage default shell for all users [FreeBSD]
This command will set bash as the default shell for all users in a FreeBSD system.

Display the standard deviation of a column of numbers with awk
This will calculate a running standard deviation in one pass and should never have the possibility for overflow that can happen with other implementations. I suppose there is a potential for underflow in the corner case where the deltas are small or the values themselves are small.

python smtp server
This command will start a simple SMTP server listening on port 1025 of localhost. This server simply prints to standard output all email headers and the email body.

Save a file you edited in vim without the needed permissions
probably just like 1204, but uses tee as a filter (+ I actually understand how this one works)

extract content of a Debian package

List the size (in human readable form) of all sub folders from the current location

Geolocate a given IP address

Cleanup a (source) text file, removing trailing spaces/tabs and multiple consecutive blank lines
I used this command (in addition to a code formatting tool) to "cleanup" a bunch of PHP files

ps a process keeping the header info so you know what the columns of numbers mean!
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1828 0.0 0.0 5396 476 ? Ss 2008 0:00 /usr/sbin/sshd


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: