+ -
当前位置:首页 → 问答吧 → 如何转换日期以秒的方式呢?

如何转换日期以秒的方式呢?

时间:2011-02-21

来源:互联网

  1. # ls -alR /abc/yahoo.com.hk/ | grep ^-r
  2. -rwx---r--  1 postfix postfix 3866 Feb 21 16:53 46154395B7B
  3. -rwx---r--  1 postfix postfix 46014 Feb 20 09:05 67F2151C94C
  4. -rwx---r--  1 postfix postfix 43294 Feb 21 12:42 725D6395B74
  5. -rwx---r--  1 postfix postfix 3869 Feb 21 16:54 D9E4E395B7C
  6. -rwx---r--  1 postfix postfix 6761 Feb 21 13:54 4482F395B72
  7. -rwx---r--  1 postfix postfix 5922 Feb 21 14:19 1908451C952
  8. -rwx---r--  1 postfix postfix 3872 Feb 21 16:53 3AE3E51C951
  9. -rwx---r--  1 postfix postfix 3010 Feb 21 17:55 3BB2A51C950
  10. -rwx---r--  1 postfix postfix 8124 Feb 21 17:44 7290451C951
  11. -rwx---r--  1 postfix postfix 2228 Feb 19 12:10 7DF31395B05
  12. -rwx---r--  1 postfix postfix 2686 Feb 20 04:23 83BA251C94C
  13. -rwx---r--  1 postfix postfix 62104 Feb 19 14:38 09F59395B0B
  14. -rwx---r--  1 postfix postfix 62105 Feb 19 14:38 2D2D9395B08
  15. -rwx---r--  1 postfix postfix 62105 Feb 19 14:38 3991A395B08
  16. -rwx---r--  1 postfix postfix 17566 Feb 19 06:24 424AC395AF9
复制代码
我想将如上内容的日期中的月/日转换成以秒的方式输出,例如:
Feb 19 相当于 1298044800

谢谢.

作者: netocool   发布时间: 2011-02-21

info date

作者: cjaizss   发布时间: 2011-02-21

date -d "日期" +%s

作者: kelehaier   发布时间: 2011-02-21

热门下载

更多