查看centos版本:cat /etc/redhat-release
设置时区:timedatectl set-timezone Asia/Shanghai
启动时间:date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"system boot:%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("系统已运行:%d天%d时%d分%d秒\n", run_days, run_hour, run_minute, run_second)}'
切换至上次目录:cd -
清空至行首:Ctrl+U
清空至行尾:Ctrl+K
移动至行首:Ctrl+A
移动至行尾:Ctrl+E

标签: Linux命令

评论已关闭