In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.