inotify+rsync(文件同步)
vim /opt/inotify_rsync.sh
INOTIFY_CMD="inotifywait -mrq -e modify,create,attrib,move,delete /var/www/html/"
RSYNC_CMD="rsync -azH --delete /var/www/html/ rput@192.168.75.111:/var/www/html/"
$INOTIFY_CMD | while read DIRECTORY EVENT FILE
do
if [ $(pgrep ^rsync$ | wc -l) -le 0 ];then
$RSYNC_CMD
fi
done
过滤大于某个值的行
[root@k8s-master01 ~]
/dev/mapper/centos-root xfs 27G 4.5G 23G 17% /
overlay overlay 27G 4.5G 23G 17% /var/lib/docker/overlay2/a967b5757bdc5e3f2f070cca4a5ed5e7d07eb405b24fb192eeb9573f73d75fbe/merged
批量创建用户
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/b70cdba0e27cf35ec41f96d33b286f51.png)