commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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.
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:
For the record: I didn't build this. Just shared what I found that worked. Apologies to the original author!
I decided I should fix the case where http://example.com is not matched for the next time I need this. So I read rfc1035 and formalized the host name regex.
If anyone finds any more holes, please comment.
Quick and kludgy rss parser for the recent tracks rss feed from last.fm. Extracts artist and track link.
Run this as root, it will be helpful to quickly get information about the loaded kernel modules.
If used without arguments, returns own IP info.
If used with argument, returns info about the parsed argument.
trying to copy all your dotfiles from one location to another, this may help
Of course, you can adjust "Maildir" to your config...
but you can't see the colors in that sample output :(
Work for me on CentOS, grep and print ip addresses of ssh bruteforce attempts
Handles everything except octets with 255. Ran through ip generator with variable octet lengths.
search argument in PATH
accept grep expressions
without args, list all binaries found in PATH
works on all Unices
works one bash and ksh.
xargs can be used in this manner to download multiple files at a time, and xargs will in this case run 10 processes at a time and initiate a new one when the number running falls below 10.
just bored here at work ... if your are daring ... add '| bash' .... enjoy
diff is designed to compare two files. You can also compare directories. In this form, bash uses 'process substitution' in place of a file as an input to diff. Each input to diff can be filtered as you choose. I use find and egrep to select the files to compare.
You can use that to create a excludefile for nmap, to find hosts, with no DHCP lease in your DHCP range.
Same thing as above, just uses fetch and ipchicken.com
slashdot.org webserver adds an X-Bender or X-Fry HTTP header to every response!
I'm working in a group project currently and annoyed at the lack of output by my teammates. Wanting hard metrics of how awesome I am and how awesome they aren't, I wrote this command up.
It will print a full repository listing of all files, remove the directories which confuse blame, run svn blame on each individual file, and tally the resulting line counts. It seems quite slow, depending on your repository location, because blame must hit the server for each individual file. You can remove the -R on the first part to print out the tallies for just the current directory.
to clean up the extra lines