2020年9月10日
摘要: 1、while 循环 x=1 while ((x<=10)) ;do if [ $x == "2" -o $x == "4" ];then #条件x=2或者x=4执行下面语句 x=$[$x+1] continue #跳过本次循环 fi echo "$x" if [ $x == "8" ];then 阅读全文
posted @ 2020-09-10 11:25 夏雨等秦天 阅读(317) 评论(0) 推荐(0) 编辑
摘要: crontab:定时任务的守护进程,精确到分,设计秒的我们一般写脚本 日志文件: ll /var/log/cron* 编辑文件: vim /etc/crontab 进程:ps -ef | grep crond ==> /etc/init.d/crond restart 作用:定时备份,实时备份 常用 阅读全文
posted @ 2020-09-10 10:54 夏雨等秦天 阅读(659) 评论(0) 推荐(0) 编辑
摘要: diff用法 比较文件内容的不同 diff file1 file2 #以后面的文件file2作为标准 比较file1相对于file2来说有什么不同 < 表示第一个文件中的内容 > 表示第二个文件中的内容 a 表示添加.......add c 表示更改.......change d 表示删除..... 阅读全文
posted @ 2020-09-10 09:30 夏雨等秦天 阅读(989) 评论(0) 推荐(0) 编辑