zoukankan      html  css  js  c++  java
  • Linux 之常用命令

    一、系统已经运行时间:

      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)}'

    举例效果:

      系统已运行:8天2时43分19秒

    二、系统上次启动时间:

      who -b

    举例效果:

      system boot  2017-05-18 16:33

    三、最后一次重启时间:

      last reboot

    举例效果:

      reboot system boot 3.13.0-32-generi Thu May 18 16:33 - 19:20 (8+02:46)

      wtmp begins Wed May 3 09:35:15 2017

    四、最后一次重启时间:

      last reboot | head -1
      reboot system boot 3.13.0-32-generi Thu May 18 16:33 - 19:21 (8+02:47)

  • 相关阅读:
    ➡️➡️➡️IELTS reading by Simon on Bili
    lc0502
    lc0331
    lc0329
    lc0327
    lc0326
    lc0324
    lc0320
    lc0319
    lc0316
  • 原文地址:https://www.cnblogs.com/pokerface/p/6910140.html
Copyright © 2011-2022 走看看