sundot home page unix consulting in the uk and mainland europe (archives)
home | about sundot | unix | downloads | archives›date | archives›subject | external links

Keep permissions/ownership and add ISO datestamp when copying Unix files.

posted by hal 20030429 (archived) | permalink | path | initial version: 20030307

If you are not using a version control system like SCCS or CVS for tracking changing in configuration files, but instead are using the cp or mv commands then avoid blindly doing something like cp /etc/vsfstab /etc/vfstab.bak.
Instead use cp -p /etc/vfstab /etc/vfstab.20030307T1205 ( or to make sure you get the right time: cp -p /etc/vfstab /etc/vfstab.`date +%Y%m%dT%H%M` ).

this way you have a copy of the old /etc/vfstab with

And while I am it - here's some sample Solaris shell code to make it easier for you to script this. It's broken down in pieces to avoid clashing with SCCS control characters. Adding the "T" as a separator adds readability (and is also the correct separator to use according to the standard).

year=`date +%Y`
month=`date +%m`
day=`date +%d`
hour=`date +%H`
minute=`date +%M`
datestamp=$year$month${day}T${hour}$minute

cp -p myfile myfile.$datestamp

New top500 supercomputers list is out - Sun makes inroads with Starfire F15K.

posted by hal 20021205 (archived) | permalink | path | initial version: 20021205

A new list of the 500 most powerful computers has been posted by top500.org. NEC can still boast the most powerful computer by a massive margin.

IBM+HP make up a big chunk of the top 50. Sun made big inroads over the last 6 months thanks to the SunFire F15K (up from 37 entries to 88;or a decent 17.6% market share in numbers). I have tipped theregister.co.uk - let's see if my first tip ever to them makes it through.


Creative Commons
 License Valid HTML 4.01! Valid CSS! Powered by Blosxom!
All content on this website is governed by a Creative Commons license.