#!/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