touch /var/log/oyzx.log
vim /etc/logrotate.d/oyzx
/var/log/oyzx.log{
monthly
size=10M
rotate 2
compress
sharedscripts
prerotate
/usr/bin/chattr -a /var/log/oyzx.log
endscript
sharedscripts
postrotate
/usr/bin/chattr +a /var/log/oyzx.log
endscript
}
lsattr /var/log/oyzx.log
logrotate -vf /etc/logrotate.conf
ll /var/log/oyzx
ll /var/log/oyzx.log*
===================================================
ftp 文件传输操作:
yum install -y vsftpd //安装vsftpd 服务端 服务器软件
yum install -y lftp //安装lfp 客户端 服务器软件
systemctl stop firewalld //关防火墙
setenforce 0
systemctl start vsftpd //启动vsftpd
ip a //查看ip地址
vim /opt/down.txt //在opt下建立一个down.txt 以便后面上传到ftp中
mv /opt/down.txt /var/ftp //移动到/var/ftp 即上传到ftp
lftp 192.168.58.128 //连接到ftp server
下载多个文件 mget file1 file2
ftp 存在于Linux系统中的