shell+ Timing Task +nginx signal Management implementation log cut storage by date

We renamed yesterday's log 00:00:01 every day, placed it in a specific directory, and then USR1 the information number control Nginx to regenerate a new log file Create a new shell script under directory/usr/local/nginx/logs/runlog.shNote: The file

Linux writing shell script processing catalina.out long time large amount of log footprint system space problem __linux

Today see the system space is occupied, and then look at large files, found that Catalina.out has been >60g, there are many solutions online, but still want to learn to write a shell script to deal with, in this record to write content, as well as

Linux system crontab shell script to execute JAR package __crontab

-CP and-classpath Specify the paths of other classes that the class runs on, usually the class library, the jar pack, and so on Windows semicolon ";" separated by semicolons on Linux: "Delimited." Use a little "." Represents the current path

[Linux--shell]linux under the tree command detailed __php

Reproduced from: http://blog.csdn.net/askbai666888/article/details/9995837 (1) tree-a display all files and directories (2) tree-d display directory name rather than content (3) Tree-f displays the full relative path name before each file or

Look at the world through the shell

Echo is similar to the LS command. Many functions can be implemented through regular expressions. For example, we can use echo. * To display all the files under the current folder, but by using echo-d. [!.]? * You can remove the current

Shell Script 1--View today's updated/created files

#!/bin/bash # This are a Shell script to find the files created by today # # Usage are: # # test.sh # function Recurce () { CD is #进入该目录 for file in *; #对目录中的每一个文件都逐一检查 do if [d "$file"]; then

Common conditions in the Shell to judge

-B file if it exists and is a block special file, True-C file If it exists and is a character special file, True-D file if it exists and is a directory, true-e File is true if it exists-F file is true if it exists and is a rule file-G file is true

Set IP address shell script

#!/bin/bashA="IPADDR.*"B="NETMASK.*"C="GATEWAY.*"D="DNS1.*"E="/etc/sysconfig/network-scripts/ifcfg-eth1"F="cat $E | sed -n ‘/BOOTP/p‘"if [ ! "$F" = "BOOTPROTO=dhcp" ] thenread -t 30 -p "Please enter the IP address:" IPread -t 30 -p "Please enter

The shell's parent-child process

January 11, 2017, Wednesday Shell parent-child processStart/execute mode:Current shell: #!/bin/bash must start at the beginning                        the first line of #! Will be discovered by the kernel, is a magic number , the kernel will

Kettle under Linux for shell scripts to perform conversion tasks

1 Create a good conversion under Windows and place it under one of the Linux folders. such as: Put the 0816_em.ktr file under the/home/cfj/kettle/testdemo.Note that the database user name and password may need to be changed if it is a job file such

Shell Programming-Variables (iii)

In shell scripts, variables are divided into two types, system variables, and custom variables.System default variables are some of the system's own variables, such as PATH variableUser-defined variables are some of the variables that you define

A shell programming fun exercises, see you will not?

guess the number game. First let the system randomly generate a number, give the number a range (1-60), let the user enter the guessing number, the input is judged, if not meet the requirements, give high or low hint, guess the right after the

Shell commands ln to link files to other directories

In the project you need to train in a batch of new datasets with the same format, without having to copy the new data set to the original training data directory, and simply create a link to the new data file in the original training data

01-shell Basic Overview

The shell is a command interpreter Shell scripts are similar to batch programs under a DOS system (disk operating system) The Shell scripting language is ideal for working with plain text types of data (configuration files, log files) The

Shell Scripting--03 Automated Deployment

1. RequirementsServer Master Agent Envtype8.0.0.1 8.0.0.11 8.0.0.111 AAA8.0.0.1128.0.0.12 8.0.0.1138.0.0.1141. Get the list of machines in the document/etc/ansible/hosts[Server][Master][Agent]2. contract to target Machine2.1 Send flask to all

[Shell] Implements script execution results matching a string

Today I received a request that a string be included in the result of the script execution and asked to find out.The idea I gave was to write the text in an appended way according to the name of the script and the result, and then find the

Shell Base 05 handles user input

1. Command-line parameters------similar to javac parameter 1 parameter 2Java-like compiled Javac parm1 ..... In the shell, the arguments are separated from the arguments by a space. Use positional parameters to identify corresponding parameter

Linux enters the history command in the shell

In the Linux shell, often input commands have a lot of similarities, even the same, if the long command, the efficiency is really very low, but can be through ctl+r, find the history of the previous input commands, it is very useful.After pressing

Shell scripting language Operators

In shell programming, operators are essential, and can be said to be used in every script. Familiarity with mastering operators is a basic skill. Comparison operators: eq Equals Ne

Linux Shell programming from beginner to proficient in exercises answers after class answers (Chapter 8)

This book has no answer. If you send an email to the author, he will not provide the answer. So I had to answer the question myself. Chapter 5 5.1 Q Cai-English-1984-Jiangsu-7 Q Cai-English-1984-Jiangsu-7 Q Cai-English-1984-Jiangsu-7 Q Cai-English-19

Total Pages: 541 1 .... 512 513 514 515 516 .... 541 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.