Commands by commandlinefu (5)

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

Tells which group you DON'T belong to (opposite of command "groups") --- uses sed
special thanks to XwZ :)

Random number generation within a range N, here N=10

Cleanup firefox's database.
For Mac OS X users only

Save the current directory without leaving it
Save the current directory without having to leave it. When you do decide to leave the current directory, use popd to return to it.

ignore .DS_Store forever in GIT
With a couple of little commands, you?ll be able to ignore the .DS_Store files forever from your git repositories on mac! The following command will add the .gitignore file to the git configuration git config --global core.excludesfile ~/.gitignore then, the following, will add the .DS_Store to the list echo .DS_Store >> ~/.gitignore

Join the content of a bash array with commas
This type of join is clearly documented in the bash manual. Only the first character of IFS is used for the delimiter.

Rsync a directory excluding pesky .svn dirs

Get a list of ssh servers on the local subnet
Scan the local network for servers who have the ssh port open.

Find the package that installed a command

Find chronological errors or bad timestamps in a Subversion repository
Lists revisions in a Subversion repository with a timestamp that doesn't follow the revision numbering order. If everything is OK, nothing is displayed.


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: