Here is operating under the mac, the main is to use the date of this order, to see more usage with man command
TO timestamp format string time
we know the date command directly to the current time into a timestamp
DATE +% S #
1,436,781,527
does not support the format conversion linux custom stamp for the practice, the following may be several
-D '06 DATE $ / 12 is / 2018 07:21:22 '+ "% S"
1528759282
$ DATE -d' 2018-06-12 07:21:22 '+ "% S"
1528759282
$ DATE -d "04 1989 june "
1989 Nian 06 Yue 04 00:00:00 CDT Sunday
at macos can customize the time format, into a timestamp (this operation is not supported on linux)
DATE -j -f # "% Y-M-% D%% H:% M:% S" "2015-07-13 18:02:00" "+% S"
1,436,781,720
stamp to time
, but the time stamp revolutions it is a very simple form of time-readable, mac and little difference centos
macos on
-r 1436781720 DATE
2015 Nian 7 Monday, 13 October 18:02:00 CST
on centos
DATE -d @ 1,436,781,720 $
2015 Nian 07 Monday, 13 October 18:02:00 CST
these two commands do a short easy to remember