[Linux] Some date --date=STRING usage

| | Comments (0)

一些 man page 沒提到的 --date=STRING 使用方法
date -d "yesterday" # 顯示昨天的時間
date -d "tomorrow" # 顯示明天的時間
date -d "1 hour" # 顯示一小時後的時間
date -d "2 day ago" # 顯示二天前的時間
date -d "3 month ago" # 顯示三個月前的時間
date -d "2 year" # 顯示二年後的時間
date -d "last friday" # 顯示上個星期五的時間
date -d "next week" # 顯示下週的時間
date -d "next month" # 顯示下個月的時間
date -d "fortnight" # 顯示二週後的時間
date -d "7/1 3 week" # 顯示 7/1 起算的第三週

Leave a comment

March 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Pank published on August 23, 2007 3:08 PM.

Windows XP SP3 Preview was the previous entry in this blog.

UNIX2DOS/DOS2UNIX for Windows is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.