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

Find common groups between two users
Updated according to flatcap's suggestion, thanks!

Make vim open in tabs by default (save to .profile)
I always add this to my .profile rc so I can do things like: "vim *.c" and the files are opened in tabs.

Filter IP's in apache access logs based on use
Show's per IP of how many requests they did to the Apache webserver

Enable verbose boot in Mac OS X Open Firmware

Set file access control lists
The file myfile is owned by tom and has read and write permissions for tom. Group and other permissions are empty which make myfile readable and writable only by tom. setfacl enables user tom to give read permission to user john only. The command 'ls -l' shows a '+' sign telling us that file access control list has been setup for myfile.

1+2-3+4-5+6-7 Series

Enter a command but keep it out of the history
Put a space in front of your command on the command line and it will not be logged as part of your command line history.

Rename files in batch

Diff 2 file struct - Useful for branch diff and jars diff(uncompressed)
This is usefull to diff 2 paths in branches of software, or in different versions of a same zip file. So you can get the real file diff.

Calculate N!


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: