随笔分类 -  常用脚本

摘要:查看脚本执行过程命令:bash -x strtst.s 时间定时同步 更加详细的参考[https://www.cnblogs.com/zhubiao/p/9768209.html] 1.查看时区:timedatectl 2.将硬件时钟调整为与本地时钟一致, 0 为设置为 UTC 时间:timedat 阅读全文
posted @ 2021-09-03 16:21 kht 编辑
摘要:查看脚本执行过程命令:bash -x strtst.s linux开机自启动脚本 ###CENTOS7开机自启动脚本 1.因为在centos7中/etc/rc.d/rc.local的权限被降低了,所以需要赋予其可执行权 chmod +x /etc/rc.d/rc.local 2.赋予脚本可执行权限 阅读全文
posted @ 2021-09-03 16:07 kht 编辑
摘要:查看脚本执行过程命令:bash -x strtst.s 常用定时脚本 #nginx日志备份脚本 #!/bin/sh BASE_DIR=/usr/local/nginx BASE_FILE_NAME1=access.log BASE_FILE_NAME2=error.log CURRENT_PATH= 阅读全文
posted @ 2021-09-03 16:04 kht 编辑