bash shell (1) 日期格式
来源:互联网 发布:linux 安装 jdk tar.gz 编辑:程序博客网 时间:2024/06/06 06:58
date +"%Y-%m-%d %H:%M:%S" 或者 date +%F\ %H\:%M\:%S
st_date=`date +"%Y-%m-%d %H:%M:%S"`
date=`date +%F`
date_time=`date +%F\ %H\:%M\:%S`
date_time_file=`date +%F,%H:%M:%S`
yesterday=`date --date="1 days ago" +%F`
$ date
Tue Feb 3 11:29:00 CST 2009
--把时间转成秒数
$ date +%s
1233631748
--把秒数转换成标准时间格式(方法1)
$ date -d '1970-1-1 0:0:0 GMT + 1233631748 seconds'
Tue Feb 3 11:29:08 CST 2009
--把秒数转换成标准时间格式(方法2)
$ date -d @1233631748
Tue Feb 3 11:29:08 CST 2009
- bash shell (1) 日期格式
- shell检验日期格式
- Linux Shell 日期格式
- bash shell(1)
- 学习1bash shell
- bash shell 小点1
- linux的shell中,日期格式校验
- shell中按格式显示日期
- shell中按格式显示日期(转)
- shell脚本获取日期的格式
- bash shell脚本之查看当前日期以及登陆用户
- shell Bash脚本指定日期的前/后几天
- linux总结-------BASH Shell(1)
- Bash - the shell (1)
- bash shell命令(1);、&&、||
- Bash Shell 变量赋值的一些固定格式
- 【Shell】shell study 日期格式和数字运算
- bash shell(bash) 快捷键
- 歼20性能超俄赶美 中国人打了翻身仗
- 提高Android用户体验——转载
- android bootloader.
- JavaScript 定义类
- Ext2的方法总结
- bash shell (1) 日期格式
- Hibernate中No row with the given identifier exists问题的原因及解决
- Android permission 访问权限大全
- 网站日志中的搜索引擎蜘蛛返回HTTP状态代码
- 解决ScriptManager.RegisterStartupScript注册只执行一次
- 关于高考的英文
- quickAction
- IMP数据时报20001错误
- Java泛型简明教程