linux top结果保存到文本上
[root@web-DB script]# cat top.sh # !/bin/bash today=`date +%Y%m%d%H%M` yesterday=`date -d "1 day ago" +%Y%m%d` work_dir="/home/script/" cd $work_dir top -b -n1 >> /home/script/dc_top/top_$today.txt find $work_dir/dc_top/*.txt -mtime +1 | xargs rm -rf
在linux下,将top命令的结果保存到文本上
贵有恒,何必三更起五更睡;最无益,只怕一日暴十寒