I'm trying to find a way to get date and time separately. For date I can do:
date -u +%d/%m/%Y
What should I do to find the time in the following format?
hh/mm/ss
Thanks
I'm trying to find a way to get date and time separately. For date I can do:
date -u +%d/%m/%Y
What should I do to find the time in the following format?
hh/mm/ss
Thanks
The date command can give you the time part as well. Check out the man page (or type man date
on your command line) for more details.
date -u +%H:%M:%S
Or to meet your formatting requirement of HH/MM/SS:
date -u +%H/%M/%S