首页 > 其他 > 详细

centos7 计算文件的时间差

时间:2021-06-04 12:21:36      阅读:14      评论:0      收藏:0      [点我收藏+]

#!/bin/bash

systime=`date +%s`

filetime=`stat -c %Y /tmp/jwt.txt`

time1=$[$systime - $filetime]

h=3600

time=`echo "sclae=3;$time1/$h"|bc`

echo $time > /tmp/time.txt


centos7 计算文件的时间差

原文:https://blog.51cto.com/907832555/2855989

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!