In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Linux shell downconversion unix time
Here is a little way to convert the Unix time display format under Shell, and give a solution to the students who are familiar with the date command immediately.
$date-d @ 1234567890
Sat Feb 14 07:31:30 CST 2009
But what if the date version is too low to support the @ parameter? Let's try the-d parameter
$date-d "UTC 1970-01-01 1234567890 secs"
Sat Feb 14 07:31:30 CST 2009
If you think you can't remember a long string of characters at a time, write a small function yourself, which you can call in ~ / .bashrc.
# convert Unix time to local time string
Function ctime ()
{
Date-d "UTC 1970-01-01 $1 secs"
}
How to use it is simple:
$ctime 1234567890
Sat Feb 14 07:31:30 CST 2009
[this article was first posted in: Baidu Operation and maintenance Space] http://hi.baidu.com/ops_bd/blog/item/a3cca26712209058eaf8f87b.html
[pay attention to Baidu Technology Salon]
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.