shell的积累
日常工作中linux的命令的积累
删除N天的文件的命令-用于清理log
1 | find ./ -mtime +1 -name "*.log*" -exec rm -rf {} \; |
按天筛选log
1 | sed -n '/2018-10-15 16:55:00/,/2018-10-15 23:59:59/p' log_path |grep "condition" |
合并redis,用于单机环境的redis导入
1 | !/bin/bash |
杂七杂八
日常工作中linux的命令的积累
1 | find ./ -mtime +1 -name "*.log*" -exec rm -rf {} \; |
1 | sed -n '/2018-10-15 16:55:00/,/2018-10-15 23:59:59/p' log_path |grep "condition" |
1 | #!/bin/bash |