Bash date timestamp format
Create a timestamp in bash using the date command invoked with a format string.
$ date "+%Y-%m-%d %H:%M:%S"
2016-03-31 10:10:31
$ echo "$(date "+%Y-%m-%d %H:%M:%S")"
2016-03-31 10:10:31
Create a timestamp in bash using the date command invoked with a format string.
$ date "+%Y-%m-%d %H:%M:%S"
2016-03-31 10:10:31
$ echo "$(date "+%Y-%m-%d %H:%M:%S")"
2016-03-31 10:10:31
Comments
Leave a Reply