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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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:
Watches the headers of a curl, following any redirects and printing only the HTTP status and the location of the possible redirects.
Convenient to leave running in a yakuake or plasmacon terminal.
For older kernels
watch -n 5 cat /proc/acpi/battery/BAT0/state
Usage:
watch ls -l
Basic but usable replacement for the "watch" command for those systems which don't have it (e.g. the Solaris I'm trapped on).
Type Ctrl+V to escape the following Ctrl+L which clears the screen. It will be displayed as "^L".
You need to have figlet(for font) and cowsay installed.
Just copy n paste this command and you can see.....
# ### ### # # ### ### # # #
## # # ### # # # # ### ## # #
# # # # ### # # # # ### # # # #
# ### ##### # # #####
# # # ### # # ### # #
# # # ### # # ### # #
##### ### ### # ##### ### ##### #
If you add the -d flag each difference in the command's output will be highlighted.
I also monitor individual drives by adding them to df. Makes for a nice thin status line that I can shove to the bottom of the monitor.
Maybe this will help you to monitor your load balancers or reverse proxies if you happen to use them. This is useful to discover TIME OUTS and this will let you know if one or more of your application servers is not connected by checking.
Shows updated status in a terminal window for connections to port '80' in a human-friendly form. Use 'watch -n1' to update every second, and 'watch -d' to highlight changes between updates.
If you wish for status updates on a port other than '80', always remember to put a space afterwards so that ":80" will not match ":8080".
Great for watching things like Maildir's or any other queue directory.
This command counts the number of blocked NGINX processes every 2 seconds and shows the last 22 measurements
You should have at least the number of cpu's in a non-blocked state.
The command up to the first ; truncates the log file.
Shows a simple clock in the console
-t param removes the watch header
Ctrl-c to exit