Copy files, preserve dates and permissions in unix

tar and feathers

This is a way to copy files in unix and keep the same time stamps, using the tar package:

tar cf – . | (cd wherever; tar -xvf -)

e.g.
change directory to path of USB stick and use:
tar cf – . | (cd /space/BACKUP/UDISK/;tar -xvf -)

kitchen rysnc

This is a another way to make a copy of a directory, the same command can be used again later to update the copy with any new files from the target directory:

rsync -va directory ~/BACKUP

e.g.
rsync -va /media/MJP_8GB_Ext2/mathew/ /space/BACKUP/8GB-disk/

Read an rysnc how to.

Using GSAS and EXPGUI in debian

EXPGUI is a graphical interface for the GSAS software, allowing structural refinement using the Reitveld technique.

EXPGUI/GSAS can be downloaded in binary form from http://www.ncnr.nist.gov/programs/crystallography/software/downloads.html

You need to install tcl/tk and also blt all of which can be found in debian package repositories. (Or whatever for your system!)

in debian:
apt-get tk8.4 blt

tcl/tk is the scripting language used to write EXPGUI.
failing to install blt will result in the error “Error — Unable to load the BLT package; cannot run liveplot”.

Accessing Papers from University of Cambridge

The University of Cambridge news feed had notified about the new use of Raven Passwords to access electronic resources.

The ATHENS system of controlling access to networked services has been centrally funded as a national service for many years. That funding is being withdrawn by the JISC in favour of national Federated Access Control based on local user login.

ATHENS handles around 3 million users and 250 online services but it is a purely UK solution to providing access to remote services. The JISC have established that a
Federated solution using open source software and international standards will lead to a Single Sign On system with an individual using their institutional login to use both national and local services. This will also tie in with strategies for e-learning and e-science.

Raven is the web authentication system administered by University of Cambridge Computing Service.

Using gnuplot for programming

Here’s an example script to calculate stuff in gnuplot. gnuplot is capable of many functions of the c programming language such as sin(x) erf(x). This is easy to extend since it is possible to define functions and perform logic.

Save this into a file calc.gnu and run with with command > gnuplot calc.gnu

# gnuplot script by Mathew Peet
# 18 February 2007
# Example script to calculate something
#
A = 1
B = 2
Answer = A + B
print "The answer: ", Answer

This could be used in conjunction with regression of data to do all sort of useful stuff.

List of supported functions

In general, any mathematical expression accepted by C, FORTRAN, Pascal, or BASIC may be plotted. The precedence of operators is determined by the specifications of the C programming language.

The supported functions include:
abs(x), acos(x), asin(x), atan(x), cos(x), cosh(x), erf(x), exp(x), inverf(x), invnorm(x), log(x), log10(x), norm(x), rand(x), sgn(x), sin(x), sinh(x), sqrt(x), tan(x), tanh(x).

Light cars

Heavy cars may be good for the owners but worse for the environment. Roel Boesenkool of Corus presented a the SMEA conference. He noted that new cars are heavier despite technology being developed that could easilty make them lighter. I wrote about this in the previous post about light cars.

The light ineffiecient car is the Ferrari.

I guess fuel doesn’t cost enough yet.

Weight and Fuel Consumption of Cars
Roel Boesenkool presented this graph at SMEA conference in sheffield

Follow

Get every new post delivered to your Inbox.