starttime=`date +'%Y-%m-%d %H:%M:%S'`
ls /usr/lib
endtime=`date +'%Y-%m-%d %H:%M:%S'`
start_seconds=$(date --date="$starttime" +%s);
end_seconds=$(date --date="$endtime" +%s);
echo "eclipsed time "$((end_seconds-start_seconds))"s"
bash shell 计时运行耗时
最新推荐文章于 2024-05-08 16:23:40 发布