Home > UN*X > Get current time in UTC, suitable for file name

Get current time in UTC, suitable for file name

Using the following ‘date’ command, we can get current time in UTC whose format is suitable for such as file name.

$ date -u "+%Y%m%d%H%M%S"
$ 20110412065955

Home > UN*X > Get current time in UTC, suitable for file name

Feeds
Meta

Return to page top