« IE Firefox 浏览器刷新和强制刷新发送的 HTTP Request Header | Main | mysql HEAP MEMORY tables 提高行数支持的方法 »
May 28, 2006
date touch 时间相关
|
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。 http://windtear.net/archives/2006/05/28/000993.html http://windtear.net/archives/2006/05/28/000993.html date touch 时间相关 -d, --date=STRING 是 date touch 都支持的 man touch -d, --date=STRING -t STAMP use [[CC]YY]MMDDhhmm[.ss] instead of current time --time=WORD set time given by WORD: access atime use (same as -a) modify mtime (same as -m) touch 使用举例: # touch -d "20040428 01:18:18" test.touch.txt or # touch -t 0605281500 test.touch.txt date 使用举例: % date Wed Apr 28 01:17:17 CST 2004 % date --date=yesterday Tue Apr 27 01:17:40 CST 2004 % date --date=yesterday +%Y%m%d 20040427 % date --date="2 days ago" +%Y%m%d 20040426 % date -s "20040428 01:18:18" % date -s "01:18:18" shell: % date +%s 1128621784 % date -d "1970-01-01 UTC 1128621784 seconds" Fri Oct 7 02:03:04 CST 2005 perl: % perl -e 'print scalar localtime 1128621784' Fri Oct 7 02:03:04 2005 php: date('Y-m-d H:i:s',time()); 相关文章: c shell perl php下的日期时间转换: 秒数与人类可读日期... http://windtear.net/archives/2005/10/07/000791.html ntpdate time synchronization & date usage http://windtear.net/archives/2004/04/28/000307.html |
Posted by windtear at May 28, 2006 11:59 PM
Trackback Pings
TrackBack URL for this entry:
http://cgi.windtear.net/cgi-bin/wt-tb.cgi/993
Comments
Post a comment
【我爱网络】
2007-12-31 23:51 2007年度 ipcn.org/ipchina.org 总结报告
2007-12-31 00:31 vmware gsx server service
2007-12-31 00:15 squid 对 404 302 缓存的相关问题
2007-12-30 14:24 升级到 MovableType 3.3x 并修改 entry_basename 兼容性
2007-12-30 13:52 [php] realip judge 前面补0的ip格式剔除
2007-12-14 16:34 rm -rf * 系统管理员要排查的定时炸弹
2007-12-13 19:03 山西的宽带运营商太过分了 私自窜改dns解析
2007-12-13 16:35 F5 MIB 再学习 唯一性标记用地址的小bug
2007-12-11 22:15 perl 用Spreadsheet::WriteExcel写了个处理/读写excel的小程序
2007-12-11 13:39 perl 变量转义的问题