Linux 运维常用命令

Linux 运维常用命令

sudo rm /var/log/syslog         # 清除日志
sudo service rsyslog restart    # 重启日志服务
who -b   			# Linux系统查看最后重启时间

Debian下修改系统时间的方式
# 设置时区
# sudo cp /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime     #时区为亚洲/上海

# 网络校时
# apt-get install ntpdate
# ntpdate 210.72.145.44        # 中国国家时间服务器: 210.72.145.44
原文地址:https://www.cnblogs.com/michaelcjl/p/15168146.html