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

参考资料:

1、linux在shell中获取时间


2、Linux系统date命令的参数及获取时间戳的方法