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

Java Remote invoke shell script

Import java.io.IOException; Import Java.io.InputStream; Import java.io.UnsupportedEncodingException; Import Java.nio.charset.Charset; Import Org.apache.commons.io.IOUtils; Import ch.ethz.ssh2.ChannelCondition; Import

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 Set__linux

SET Command The set command acts primarily to display shell variables that already exist in the system, and to set new variable values for shell variables. When you use set to change shell attributes, the function of the symbol "+" and "-" is to

Several common shell commands

How to implement the line content code to remove the file * * *:If you only want to see the first 5 lines of the file, you can use the Head command,such as: Head-5/etc/passwdIf you want to view the following 10 lines of the file, you can use the

Linux shell script periodically cleans Tomcat log files (first draft) __linux

Shell script to clean up logs ------------------------------------------------------------------------------------------------ #!/bin/bash tomcatnum=2 #清理的路径 tomcat[0]= "/usr/local/tomcat/logs"tomcat[1]= "/data/logs/tomcat0"For ((i=0;iecho "Deleting

Shell cutting Nginx Log tool for five days without restarting Nginx

Ideas: 1, back up yesterday's log, while deleting the five days before the backup data. 2, copy the log file, and set the original log file is empty Shell #!/bin/bash #function: Cut nginx log files #author Kung log_path= '/home/wwwlogs/'

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

Linux Shell Basic Operations __linux

~ Represents the current user's root directory/home/username/ /represents all the root directory . Represents the current directory Copy files:1. Copy Local files to remoteSCP filename User name @ computer IP: remote path2. Copy files back to local

Symbolic descriptions of shell scripts in Linux __linux

#。 The first sentence in the footsteps, indicating the program used to execute the script Example: #!/bin/bash # comments, for help information or for ignoring statements that are temporarily not executed # This is a comment $ variable

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

Shell in-process conversion

Decimal transfer to other system> Echo ' obase=16;4196939 ' |BC turn 16> Echo ' obase=2;4196939 ' |BC turn 2> Echo ' obase=8;4196939 ' |BC turn 8 Other decimal systems in turn> Echo $ ((16#122)) or echo $ (0x122) # ext. 16> Echo $ ((2#1010)) # turn

Linux Shell Script First Knowledge

Shell Secript:Differences in execution modes:The./sh execution is performed in the creation of a subroutine that only inherits the environment variables,If the export declares that the subroutine's subroutine will inherit, it will not be promoted to

Shell Special variables

List of special variables variables meaning $ File name of the current script $n Arguments passed to the script or function. N is a number that represents the first few parameters. For

[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

Commands commonly used in shell scripts (i)

seq 1 100The notation of the seriesWc-l count Rows-C bytes-W wordsbasename returns a basic file name for a stringDirName leave the non-directory part except the file nameRead-p "" Name prints a hint and waits for input input information to be given

Shell calculation script

#!/bin/bashPrint_usage () {printf "Please enter an inteper \ n"}Read-p "Please input first number:" FirstnumWhile ["echo "$firstnum" | sed -r ‘s#[^0-9]##g‘"! =" $firstnum "]DoPrint_usageRead FirstnumDoneRead-p "Please input the operators:"

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 Common Commands

PM2:Start ----- pm2 Start/bin/www-watch stop ----- pm2 Stop app_name| app_id Display LogView port occupancy and force the release of occupied portsSometimes when the software is turned off, the background process dies, causing the port to be

Total Pages: 541 1 .... 429 430 431 432 433 .... 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.