commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Values will depend on the driver and the hardware specifics, so you need to refer to your driver documentation for proper interpretation of those values.
Lists all opened sockets (not only listeners), no DNS resolution (so it's fast), the process id and the user holding the socket.
Previous samples were limiting to TCP too, this also lists UDP listeners.
This short snippet outputs the state of all containers available on your system. It is quite helpful to see which ones are running and which are stopped. Please notice that the "sort -u" is needed, otherwise running containers will be reported twice (see output of "lxc-ls" on its own for why)
check apache2 status with a lot of details
urls.txt should have a fully qualified url on each line
to clear the log
change curl command to
curl --head $file | head -1 >> log.txt
to just get the http status
Parse the output of git status.
Once the line '# Changed but not updated:' has passed print every last part of the line if it exists on disk.
Updates your Ping.fm status and websites supported by ping.fm (like twitter, facebook, and google talk).
If you need to keep an eye on a command whose output is changing, use the watch command. For example, to keep an eye on your load average