Cheug's Blog

当前位置:网站首页 / 技术积累 / 正文

centos7查询系统启动时间

2021-03-22 / 技术积累 / 1366 次围观 / 0 次吐槽 /
 cat /proc/uptime| awk -F. '{run_days=$1 / 86400;run_hour=($1 % 86400)/3600;run_minute=($1 % 3600)/60;run_second=$1 % 60;printf("系统已运行:%d天%d 时%d分%d秒",run_days,run_hour,run_minute,run_second)}'


Powered By Cheug's Blog

Copyright Cheug Rights Reserved.