linux shell 常见的时间戳操作

获取当前的时间戳
date +%s

获取某个时间点的时间戳
date -d "2017-08-07" +%s

把时间戳转换为具体的时间
date -d @1502035200 +"%Y.%m.%d"