I was surprised to learn that creation dates are not included in stat output. I really thought stat would include something so basic. You get time of last access, time of last data modification, and time of last file status change, but creation date isn’t in there.
On the Mac, this info is stored in the resource fork. You can get it from the command line using GetFileInfo which is installed when you install Apple’s free Developer Tools.
/Developer/Tools/GetFileInfo -d path/to/file
In Applescript you can use info for:
creation date of (info for (choose file))
Software RAID striped mirrors or mirrored stripes are possible in Mac OS X. They may be 10.5 only. I haven’t tested other versions.
Simply create your striped sets using DiskUtility or diskutil, then use the command line diskutil and supply the /dev/diskx entries of the stripe sets when creating your mirror.
First run diskutil list to get the /dev/disk entries for each stripe, then create your mirror using:
diskutil createRAID mirror MirrorName JHFS+ disk1 disk2
where disk1 is the device for the first stripe set and disk2 is the device for the second stripe set.
The result is also bootable and will display correctly as a nested RAID in DiskUtility.app.
If you have output that is separated by new lines, but you really want it formatted into a single line with commas as separators or maybe a space as a separator, just pipe to tr.
Here is a simple example:
kserver:~ patternbuffer$ diskutil list | grep ^/dev
If we want them separated by spaces, we could do:
kserver:~ patternbuffer$ diskutil list | grep ^/dev | tr '\n' ' '
Note that there is a newline on the end of the output, so that trailing newline is also translated. So if you don’t want it there, you’ll have to chomp it off. I use sed, but use what you like.
Here is the same as above, but with commas, with sed to remove the trailing comma.
kserver:~ patternbuffer$ diskutil list | grep ^/dev | tr '\n' ',' | sed 's/.$//'