shell获取系统当前时间戳:https://blog.csdn.net/c1481118216/article/details/77132270
current=`date "+%Y-%m-%d %H:%M:%S"`
timeStamp=`date -d "$current" +%s`
#将current转换为时间戳,精确到毫秒
currentTimeStamp=$((timeStamp*1000+`date "+%N"`/1000000))
echo $currentTimeStamp
linux时间格式转换
原文链接:https://www.f2er.com/bash/387881.html