More
Image
How to print date in unix
By JC.Adinarayana Reddy On 03 Jan 2015
Categories: UNIX
Print system date and time in default format.
$ date
 
Output:Sat Mar  9 17:09:06 UTC 2014
 
Print only month name
$ date +%B
 
Output:March
 
Print only system time
$ date +%T
 
Output:13:09:26
 
Print only system date
$ date +%D
 
Output:01/01/15
 
Print only year value
$ date +%Y
 
Output:2014

Comments
Message :
Comments
JC.Adinarayana Reddy
.net
.net