Date in seconds on Solaris

On Linux you can run 'date "+%s"' and get the date in seconds since 1970. On solaris you either have to install GNU date or resort to perl

perl -e 'print int(time)'

To find this out you have to run 'man date', no on Solaris you have to run 'man -s 1 date' as the default brings up the Fortran Function. Oh then you have have to run 'man strftime' as the date page does not contain any useful info.

More info and a solution in C can be found at this (forum entry about solaris time in seconds](http://www.unix.com/unix-dummies-questions-answers/29490-any-command-like-date-s-solaris.html)

Yet more Solaris yack shaving.

blog comments powered by Disqus