1. 程式人生 > >Linux下date常用格式化輸出

Linux下date常用格式化輸出

spa pre style pan linux下 %d tom lin date

date "+%Y-%m-%d"  
2013-02-19date "+%H:%M:%S"  
13:13:59date "+%Y-%m-%d %H:%M:%S"  
2013-02-19 13:14:19date "+%Y_%m_%d %H:%M:%S"    
2013_02_19 13:14:58date -d today   
Tue Feb 19 13:10:38 CST 2013date -d now  
Tue Feb 19 13:10:43 CST 2013date -d tomorrow  
Wed Feb 20 13:11:06 CST 2013date -d yesterday  
Mon Feb 
18 13:11:58 CST 2013

Linux下date常用格式化輸出