Wednesday, 4 January 2012

hard drive benchmarking

$ sudo hdparm -t /dev/sda
[sudo] password for you:

/dev/sda:
Timing buffered disk reads: 268 MB in 3.02 seconds = 88.88 MB/sec
$

Tuesday, 3 January 2012

Compression using parallel cores.

pbzip2 I think. Detects number of cores automatically and uses them.

Examples:

to come!

An alternative: pigz sounds interesting.....

Wednesday, 30 November 2011

funny characters in mutt or midnight commander mc

In .bashrc use,

export LANG=en_US.iso88591

Possibly better approach:

export LANG="C"

Saturday, 29 October 2011

scanning web data with python

page = urlopen("http://www.whatever.org")

text = page.read().decode("utf8")
start = text.find('findThisText')

Friday, 28 October 2011

mass file renaming

$ for i in *.old; do mv $i ${i/old/new}; done


or, from http://www.thegeekstuff.com/2010/07/bash-string-manipulation/
use  % to delete the shortest match from the back of the string, then append `.svg':

Rename all .pdf files to .svg:
====================

$ for i in `ls *.pdf`; do mv $i ${i%.pdf}.svg; done


The `ls` command is superfluous:

$ for i in *.pdf; do mv $i ${i%.pdf}.svg; done


Neat!


Thursday, 22 September 2011

ERROR IN C24012 NODE1= 78 IDTS= 0 ICOL= 79 IPATCH= 7 NBF= 12

PAFEC.

Axisymmetric acoustics with constant pressure patch.

ERROR IN C24012 NODE1= 78 IDTS= 0 ICOL= 79 IPATCH= 7 NBF= 12

in Phase 7

Friday, 2 September 2011

Why should I avoid Labview?

Here is an example:

http://forums.ni.com/t5/LabVIEW/how-can-i-export-my-FFT-vibration-data-to-excel-using-write-to/td-p/1052505

With the instructions provided at,

http://forums.ni.com/ni/attachments/ni/170/468006/1/fft.png

In short, it's a world of unexplained acronyms; hidden details; and graphically driven commands.