shell shell时间戳 2021-07-28 Source Edit History shell时间戳 Catalogue 123456789用shell将时间字符串与时间戳互转:date -d "2010-10-18 00:00:00" +%s 输出形如:1287331200而时间戳转换为字符串可以这样做:date -d @1287331200 "+%Y-%m-%d" 输出形如:2010-10-18时间戳可以理解为秒数,是可以加减的