随笔 - 229
文章 - 0
评论 - 10
阅读 -
26万
随笔分类 - linux
vim编辑器常用操作
摘要:打开文件并且跳转到指定行: vim filename +245
阅读全文
定时任务crond
摘要:在服务器上使用crond完成定时操作很方便, 下面简单记录一下。 常用的命令主要有以下三个: (1)编辑定时任务 crontab -e (2) 查看定时任务 crontab -l (3) 删除定时任务 crontab -r 示例1: 1. 先crontab -e, 在弹出的编辑文件中输入 * * *
阅读全文
日志管理工具logrotate
摘要:工作所需,需要管理脚本的打印日志,百度一圈,发现了logrotate这款工具,经测试确实挺好的! 话不多说,直接上重点,以便于以后需要时查看 命令: whereis logrotate 可以看到logrotate相关的配置 /etc/logrotate.conf 这是logrotate默认的配置文件
阅读全文
Centos7关闭防火墙
摘要:查看防火墙状态: systemctl status firewalld 关闭防火墙: systemctl stop firewalld 开启防火墙: systemctl start firewalld 将关闭防火墙设置为开机启动: systemctl disable firewalld.servic
阅读全文