Check These Out
You could also pipe to logger.
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"
}
~$ tar --version
tar (GNU tar) 1.20
This is useful if you have a program which doesn't work well with multicore CPUs. With taskset you can set its CPU affinity to run on only one core.
It's the same like 'cp -p' if available. It's faster over networks than scp. If you have to copy gigs of data you could also use netcat and the tar -z option in conjunction -- on the receiving end do:
# nc -l 7000 | tar -xzvpf -
...and on the sending end do:
# tar -czf - * | nc otherhost 7000
This saves Subversion's log output as XML and then runs an XQuery over it. This is standard XQuery 1.0 and should therefore also work with other XQuery processors. I have tested it with Zorba (http://www.zorba-xquery.com). XQilla (http://xqilla.sourceforge.net) also does it, but you'd have to save the query to a file and then execute "xqilla filename.xq".
The query first finds all distinct authors and then, for each author, sums up the number of paths they have changed in each commit. This accounts for commits of multiple changes at once.
The indenting space in all lines from the second one seems to be due to a bug in Zorba.
Need output in mbps (bits)
# ./bytes-second.sh eth0
eth0 interface maximum Speed: 1000Mb/s
RX:12883212 TX:17402002 B/s | RX:98 TX:132 Mb/s
RX:12371647 TX:17830111 B/s | RX:94 TX:136 Mb/s
RX:12502750 TX:17860915 B/s | RX:95 TX:136 Mb/s
If the pdf/dvi/etc documentation for a latex package is already part of your local texmf tree, then texdoc will find and display it for you. If the documentation is not available on your system, it will bring up the package's webpage at CTAN to help you investigate.
Due to the recent dynamic update vulnerability with bind, I was forced to dig a little deeper into dig...