得到秒当前时间,因为时代在Linux上,猛砸 [英] get current time in seconds since the Epoch on Linux, Bash
本文介绍了得到秒当前时间,因为时代在Linux上,猛砸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要像日期
,简单的东西,但秒钟自1970年以来,而不是当前的日期,小时,分钟和秒。
I need something simple like date
, but in seconds since 1970 instead of the current date, hours, minutes, and seconds.
日期
似乎并没有提供该选项。有一个简单的方法?
date
doesn't seem to offer that option. Is there an easy way?
推荐答案
这应该工作:
date +%s
这篇关于得到秒当前时间,因为时代在Linux上,猛砸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文