How to use the date command to display, for example, 10-Mar-2010 01:01:53? What's the format string?

  • 5
    Is your man page broken? Is Google down? – S.Lott Jun 15 '10 at 14:29

See date manual:

date '+%d-%b-%Y %H:%M:%S'

Read the manpage (man date)!

date +"%d-%b-%Y %T"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.