Check These Out
This will start a netcat process listening on port 666. If you are able connect to your your server, netcat will receive the data being sent and spit it out to the screen (it may look like random garbage, so you might want to redirect it to a file).
Limited, but useful construct to extract text embedded in XML tags. This will only work if bar is all on one line.
If nobody posts an alternative for the multiline sed version, I'll figure it out later...
Converts any number of seconds into days, hours, minutes and seconds.
sec2dhms() {
declare -i SS="$1"
D=$(( SS / 86400 ))
H=$(( SS % 86400 / 3600 ))
M=$(( SS % 3600 / 60 ))
S=$(( SS % 60 ))
[ "$D" -gt 0 ] && echo -n "${D}:"
[ "$H" -gt 0 ] && printf "%02g:" "$H"
printf "%02g:%02g\n" "$M" "$S"
}
You'll be notified if your core 1 temperature exceeds 50 degrees, you can change the monitored device by editing the "Core 1" or change the critical temperature by editing the "-gt 50" part.
Note: you must have lm-sensors installed and configured in order to get this command working.
We all know...
$ nice -n19
for low CPU priority.
$ ionice -c3
for low I/O priority.
nocache can be useful in related scenarios, when we operate on very large files just a single time, e.g. a backup job. It advises the kernel that no caching is required for the involved files, so our current file cache is not erased, potentially decreasing performance on other, more typical file I/O, e.g. on a desktop.
http://askubuntu.com/questions/122857
https://github.com/Feh/nocache
http://packages.debian.org/search?keywords=nocache
http://packages.ubuntu.com/search?keywords=nocache
To undo caching of a single file in hindsight, you can do
$ cachedel
To check the cache status of a file, do
$ cachestats
Use ImageMagick to create a "black and white" copy of an image.
Hello,
Take a look at this free cd replacement - "cd deluxe" a.k.a. "cdd".
It is a free open source (GPLv3) application that I have created. As a long time command line enthusiast I have always been frustrated with the limited capabilities of the humble "cd" command. Especially since that is the most commonly used command line utility! See http://www.plan10.com/cdd for the full details and download information.
Thanks,
-Mike