系统启动时间

who -b
date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M:%S"

系统已运行时间

cat /proc/uptime| awk -F. '{run_days=$1 / 86400;run_hour=($1 % 86400)/3600;run_minute=($1 % 3600)/60;run_second=$1 % 60;printf("%dd %d:%d:%d\n",run_days,run_hour,run_minute,run_second)}'
 
 

相关文章:

  • 2021-11-15
  • 2022-01-24
  • 2022-03-01
  • 2022-12-23
  • 2021-12-17
  • 2021-11-28
  • 2021-11-17
  • 2021-12-16
猜你喜欢
  • 2021-11-28
  • 2021-08-06
  • 2022-12-23
  • 2021-11-07
  • 2021-12-10
  • 2021-08-15
  • 2021-12-07
相关资源
相似解决方案