两个小脚本
时间转换为秒
date -d'1970-01-01 00:01:01 UTC ' +%s |
秒转换为时间
date -d'1970-01-01 UTC 1267135734 second' |
再加个格式:
date -d'1970-01-01 UTC 1267135734 second' +'%Y-%m-%d %H:%m:%S' |
原创文章如转载,请注明:转载自CODIGG [ http://www.codigg.com/ ]
本文链接地址:http://www.codigg.com/2010/02/shell-date-script/


二月 2nd, 2012 at 11:36
i bookmarked you in my browser admin thank you so much i is going to be trying to find your future posts
[回复]
二月 2nd, 2012 at 17:20
This is a different sort of opinion that many people don’t usually talk about. Generally when I come across these sort of things I like to post them on Digg. I don’t think this would be the best to submit though. I’ll look around and find another article that may work.
[回复]
二月 3rd, 2012 at 04:46
I am impressed with this site, rattling I am a fan .
[回复]
二月 3rd, 2012 at 06:15
I want to show my thanks to this writer for rescuing me from this trouble. Because of surfing throughout the online world and obtaining thoughts which were not beneficial, I figured my life was well over. Existing without the presence of answers to the problems you have fixed by way of this write-up is a crucial case, and ones which could have negatively affected my entire career if I had not come across your site. Your own personal understanding and kindness in taking care of every item was very helpful. I am not sure what I would’ve done if I had not encountered such a solution like this. I’m able to now look forward to my future. Thank you so much for the skilled and effective help. I will not hesitate to endorse your blog post to anyone who should get guidelines on this matter.
[回复]
二月 4th, 2012 at 04:54
Now there are a bit of engaging points throughout time in this specific page but We don’t comprehend if We find pretty much all of them center to heart. There is some quality however , I really could take hold viewpoint till I investigate into this even further. Wonderful article , Many thanks. and Simply put I would like even more! Included to my social bookmarks too
[回复]
二月 4th, 2012 at 15:50
I required for this web site article admin seriously thanks i’ll appear your following sharings i bookmarked your blog site
[回复]
二月 5th, 2012 at 12:23
Trusting to make the right decisions can be tough. Many of us develop this ability over the course of our life. Frankly it takes more than just happening to happen.
[回复]
二月 5th, 2012 at 14:40
Hey! I just would want to give a huge ‘thumbs up’. . . for the good data which you have on this website. I’ll be returning to your blog for much more in the near future.
[回复]