Bash shell commands and monitoring that little Thing (ii)

Top of the Bash shell Command and monitor  The last time we talked about the PS command, although the PS command is useful in collecting process information running on the system, but there are shortcomings, PS command can only display information

Shell Programming Basics

In this paper, the basic syntax of the shell is briefly recorded for future use!1. Shell variablesWhen you define a variable name without the dollar sign $, you only need to add the dollar sign before the variable name when using the variable. As1

Linux--shell Monitor Tomcat and automate reboots

#! /bin/sh#while: Dead Loop#doui=$ (PS x |grep Catalina |grep Tomcat |grep-v Grep|awk ' {print $} ')Echo ' Tomcat pid is ' $uiIf["$ui" = = ""]; thenecho "Tomcat is shutdown, now start up tomcat ...."#export java_home=/opt/jdk/1.6Export path= $JAVA

Shell script: Write data to disk in bulk

First, about this article The monitoring system to be done requires monitoring the usage of disk space and alerting. When testing this feature, it is necessary to simulate two scenarios: one is the need to trigger the alarm mechanism when the disk

command input in the shell fast! Jie! Key!

Very good!!Very good!!DeleteCTRL + D deletes the character at the cursor location equivalent to VIM x or DLCTRL + H deletes the character in front of the cursor, which corresponds to the HX or DH in vim.Ctrl + K Delete all characters after cursor

Shell Learning notes-continuous recording

1.#!/bin/sh Use the SH program to execute the code below#!/bin/more output the code belowThe code below the #!/bin/executable will be used as input to this program2. * Can be used to match file names, regular matches, as multiplication. * * can also

<linux command, editor and Shell Programming > Commands Section reading notes

Ctrl+u can delete rows under the shell, if this key doesn't work, try Ctrl+xCTRL + Z You can suspend a program without terminating the program, but you can suspend the program.This job can then be switched to the foreground by the FG commandCP

Shell Code Common table

List of special variables Variable 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 example,

$0,$?,$! and << ' END ' in the Linux shell

Variable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a glance using the SET command$*All parameter lists. such as "$*" in the

[In Linux]shell, the application of the anti-quote (')

The anti-quote bit (') is located above the TAB key of the keyboard, to the left of the 1 key. Note the difference between the single quotation mark (') on the left side of the ENTER key.Anti-quote bit (') plays the role of command substitution in

A shell-init error occurred while executing a shell command (directory does not exist)

Occurs when a service command is executedShell-init:error Retrieving current Directory:getcwd:cannot access parent directories:no such file or directoryChdir:error Retrieving current Directory:getcwd:cannot access parent directories:no such file or

Tips for the basics of Shell programming

Exit statusThe built-in command in bash does not create a new process, but it also has the exit status, usually with 0 to indicate that a success nonzero indicates a failure, although the built-in command does not create a new process, but there is

Shell redirection 1> 2> &>

0 indicates standard input1 indicates standard output2 indicates standard error output> default to standard output redirect, same as 1>2>&1 means redirecting the standard error output to the standard output.&>file means to redirect both the standard

Day: Shell programming Basics and writing Makefile

One: Shell Programming basicsShell definition: The shell is a program that acts as an interface between a user and a Linux system. It allows the user to enter commands that need to be executed to the operating system. There are many shells in the

Summarize your own 8 tips used in shell command line

Original blog, reproduced please indicate the sourceThe shell is the command interpreter.See which shells are supported by this system1 Tab Command completionThis can be used almost every time, for example, I have a file called file.txt, if only one

Very powerful shell-written Tetris

Very powerful shell-written Tetris On the Internet, you can see a Russian box written using linux shell scripts. It is the most awesome shell I have ever written. Share. The original author information is included in the comments of the script. :

Shell variables and shell Variables

Shell variables and shell Variables Suppose we define a variable:File =/dir1/dir2/dir3/my.file.txt You can replace $ {} with different values:$ {File # */}: Delete the first/and its left string: dir1/dir2/dir3/my.file.txt$ {File ### */}: Delete the

[Linux] shell, the application of anti-quotation marks ('), linuxshell

[Linux] shell, the application of anti-quotation marks ('), linuxshellThe quotation mark (') is located at the top of the Tab key of the keyboard and the left side of the key 1. Note the difference between it and the single quotation mark (') on the

Shell condition judgment

Shell condition judgment1. if condition judgment: if [condition]; then do something fi multiple conditions: & represents AND | represents OR multiple judgments: if [condition]; then do something elif [condition 2]; then // do something else // do

Shell acronyms and judgment symbols []

Shell acronyms and judgment symbols []1. The test command is used to detect the file type and compare values. Determine whether a file exists: [work@www sh]$ test -e file.txt && echo "exist" || echo "not exist" not exist[work@www sh]$

Total Pages: 541 1 .... 323 324 325 326 327 .... 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.