藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年6月26日 11:18


請教關於顯示時間的問題

有沒有命令或者函數能顯示前一天的日期?

[code]
[0 N0.2034 huan ~ ]$ date +%F
2006-06-17

[0 N0.2035 huan ~ ]$ date +%F --date="-1 day"
2006-06-16

[0 N0.2036 huan ~ ]$ date +%F --date="2006-03-04 -1 day"
2006-03-03

[/code]


-->
date -d yesterday

http://www.lslnet.com/linux/#viewthread.php?tid=674903&extra=page%3D1

看[u][url=http://www.lslnet.com/linux/#viewthread.php?tid=674903&extra=page%3D1]新手導航[/u]



Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com