A question about the date Function

Martin McCormick martin at dc.cis.okstate.edu
Wed Sep 16 20:25:17 UTC 2009

	The man page on date has an example showing how to get
an output showing the number of seconds since the Epoch.

date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s"

	There is an envokation of date embedded in this command

date +%s

I was curious as to what this command does so I tried the long
form and then the short form with:

date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s" >f0
date +%s >f1

I then compared the outputs of f0 and f1 and they are identical.

	What does the long form of this command give us that
date +%s fails to do?

	Nothing is broken, here. I am just curious. Thank you.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Telecommunications Services Group

More information about the freebsd-questions mailing list