Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I used redhat as server and now i've just installed ubuntu server. the problem is the output date format in logs is diffrent from redhat. when i use date command it show wen may 30 20:00 2012 now i want to change it to 2012.5.30.20:00 pleas help me to do that. by the w

share|improve this question
add comment

1 Answer 1

date --help

and

man date

both explain how to define a custom format for the output of the date command.

What you're looking for can be found with

date +%Y.%m.%d.%R

with everything after the + being the string to output with the variables from the current date.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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