date command

From thelinuxwiki
Revision as of 04:01, 2 August 2013 by Nighthawk (Talk | contribs)

Jump to: navigation, search

to get a formatted date command, just append a + followed by format denotations. Just type in what characters you want to divide the parameters by. Dash, dot, ect...

just give me the year!

# date +%Y
2013

year, month, day...

# date +%Y-%m-%d                                                                                                        ~
2013-08-01

just give me the time!

# date +%H.%M.%S                                                                                                        ~
23.00.20