Tuesday, June 16, 2015

Date Command with Format

Date command in Linux shows the results as below:
#date
#Tue Jun 16 16:18:50 EDT 2015

But if you want to display the date say in the format 16-06-15 then use the following format option with date command:
#date +"%d-%m-%y"
#16-06-15

No comments:

Post a Comment