linux命令整理

常用命令,基于现在的我不常用或者少接触的命令整理,每日累计中

 

  echo "- - -" > /sys/class/scsi_host/host0/scan       //重新识别硬盘

  sar -s 07:00:00 -e 10:00:00                    //每隔10分钟查看7点到9点负载情况,可调整参数查看其它

  getfacl -R /opt > chmod.txt                     //保存/opt下的目录权限到文件 
  setfacl --restore=chmod.txt                     //根据文件恢复权限

  openssl rand -base64 10                   //生成10位s数

  tcpdump -i eth0 -s0 -vv net ip and port 80 -w /tmp/data.pcap            //常用抓包命令

  find / -name "*" -ctime +20 -exec rm -f {} \;               //查找并删除

  chage -l user                       //查看用户账号信息
  rsync -aux /root/ root@127.0.0.1:/opt                  //常见同步



posted @ 2020-12-15 21:39  linyukk  阅读(44)  评论(0)    收藏  举报