Get the App
SLTechnology News&Howtos  ›  Development  › 

How to divide shell under Linux

Shulou Source: shulou.com Published: 2022-06-01 04:00:51 11月17日 Update

Most people do not understand the knowledge points of this article "how to divide shell under Linux", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to divide shell under Linux" article.

The script is as follows:

#! / bin/bash#function:cut nginx log files for lnmp v0.5 and v0.6#author: http://lnmp.org# sets the directory where your logs are stored log_files_path= "/ home/wwwlogs/" # logs store log_files_dir=$ {log_files_path} $(date-d "yesterday" + "% y") / $(date-d "log" + "% m") # set the name of the log file that requires log segmentation Multiple log_files_name= separated by spaces (access www.abc3210.com) # set the installation path of nginx nginx_sbin= "/ usr/local/nginx/sbin/nginx" # set how long you want to savesave_days=30#please do not modify the following script # # # mkdir-p $log_files_dirlog_files_num=$ {# log_files_name [@]} # cut nginx log filesfor ((iTun0) I

Tags: Content logs files articles directories knowledge articles values tasks multiple most that is forms file names more permissions steps knowledge points spaces scripts Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia OPPO Reno Shulou Technology MariaDB Shulou Tech Info