linux常用的小技巧命令
时间:2010-06-07 来源:hkebao
1、显示10条最常用的命令:
sed -e "s/| /\n/g" ~/.bash_history | cut -d ' ' -f 1 | sort | uniq -c | sort -nr | head
2、 定时校正服务器时钟,定时与中国国家授时中心授时服务器同步
# crontab -e
加入一行:
15 3 * * * /usr/sbin/ntpdate 210.72.145.44 > /dev/null 2>&1
PS:这句不太明白。难道虚拟机时间不同步还得这样来处理吗?
sed -e "s/| /\n/g" ~/.bash_history | cut -d ' ' -f 1 | sort | uniq -c | sort -nr | head
2、 定时校正服务器时钟,定时与中国国家授时中心授时服务器同步
# crontab -e
加入一行:
15 3 * * * /usr/sbin/ntpdate 210.72.145.44 > /dev/null 2>&1
PS:这句不太明白。难道虚拟机时间不同步还得这样来处理吗?
相关阅读 更多 +