Check These Out
Only under linux.
Requires Gvim compiled with "clientserver" functionality and
wmctrl command installed on system.
Instead of servername can be used the current edited file name.
Put it in a function and map it for get rid of "Press a key" after execution.
'ps ax' provides the fill list of running processes.
'grep -c [c]at' will find all processes that match 'cat' without matching itself....
Some commands have more information on 'info' than in the man pages
When some console full-screen program (minicom, vi, some installers) breaks down your terminal, try this command to revert all options to "sane" settings (sane is a built-in combo of a lot of stty options)
A simple way yo do a progress bar like wget.
Command makes use of the Malware Hash Registry (http://www.team-cymru.org/Services/MHR/).
It parses the current directory and subdirectories and calculates the md5 hash of the files, then prints the name and sends the hash to the MHR for a lookup in their database.
The 3rd value in the result is the detection percentage across a mix of AV packages.
This command will show the current GMT time using HTTP. This might be useful if you just want to know what's the current human-readable and accurate-enough time, without changing the system time, using a simple command that would work regardless of the availability of NTP.
Note: To get a quicker and more accurate response, replace google.com with your local NTP server.
Also can be used as an alternative to the "htpdate" program:
http://www.commandlinefu.com/commands/view/668/set-your-computers-clock-using-http-and-htp-http-time-protocol-when-ntpsntp-is-not-available
Print line numbers also, so you don't have to search through the files once its open for the string you already grepped for.
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"
}