on Linux the syntax for date with seconds is:

date +%s

from MAN PAGE - %s seconds since 1970-01-01 00:00:00 UTC

what is the same equivalent for Solaris?

  • 1
    With Solaris 11: date +%s :)
    – Cyrus
    Aug 3, 2015 at 18:36

1 Answer 1


On Solaris (or any POSIX system), you can use:

nawk 'BEGIN{srand(); print srand()}'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.