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:
Alter "AddHandler php5-cgi .php" and "AddHandler php4-cgi .php" entries to new "AddHandler x-httpd-php5 .php" respective php4 entries in all .htaccess files under /var/www
allows you to use floating point operations in shell scripts
du only accepts lines ending with a NUL, which can be a pain to create. This solves that issue.
The `-q' arg forces tail to not output the name of the current file
You can tell GCC to automatically select optimization commands and produce optimized code for the local machine (the one compiling the code), but you can't normally see what switches have been selected and used unless you append a "-v" and pause compilation.
Shows a less detailed output, made only of the process tree and their pids.
This will download all the phracks! Enjoy!
If you're like some individuals who rely on ndiswrapper and cannot use kismet, this command may be of service.
watch -n .5 "iwlist wlan0 scan | egrep 'ESSID|Encryption'"
watch -n .5 "iwlist wlan0 scan | egrep 'ESSID|Encryption' | egrep 'linksys'"
:-) Hopefully you'll find some dd-wrt compatible routers.
doesn't require "at", change the "2h" to whatever you want... (deafult unit for sleep is seconds)
#Usage: watch timeinsecond "command"
Stores the currently active iptables rules to a file that will be applied upon reboot
If you don't save the rule set it won't be applied during a reboot
Locally watch MySQL process list update every 5s on a remote host. While you watch pipe to a file. The file out put is messy though but hey at least you have a history of what you see.
Enable 'sleep' function in Windows environment where this does not exist, although not exact in time. (there is a delay for each ping) This is a simple way to separate commands with a time-period.
Character: "?" is the Byte Order Mark (BOM) of the Unicode Standard.
Specifically it is the hex bytes EF BB BF, which form the UTF-8 representation of the BOM,
misinterpreted as ISO 8859/1 text instead of UTF-8.
Whereas ^V is CTRL-V.
converts a dos file to unix by removing 0x13 characters