Application Scenario: A directory contains many software source Tarball, after the deployment of these software, will certainly generate a lot of useless temporary directory, you can script the way to delete all directories in the directory. When
Http://wiki.ubuntu.org.cn/Shell%E7%BC%96%E7%A8%8B%E5%9F%BA%E7%A1%80This article LealLicense:
Authoring Sharing Agreements
GNU Free Documentation License
Editorial staff: Firehare, Dbzhang800We can use any kind of text editor, such
6.shell function6.1. Defining functionsBrief introduction:The shell allows a set of command sets or statements to form an available block that becomes a shell functionDefining the format of a functionMethod OneFunction name (){Command 1......}Method
In this case, it is usually a shell script written under window and copied to the Linux machine for execution to occur.The reason is:The end of each line under Windows is \n\r, and the end of the file under Linux is \ nThis allows window to write an
The type of shell that stands in terms of user login:Log-in Shell:Log in normally via a terminalSu-usernameSu-l USERNAMENon-logon Shell:Su USERNAME (using su to switch users without any parameters)Open Command Window under GUIShell scripts that are
The logical operators of the shell involve the following types, so as long as the appropriate choice, can solve our many complex judgments, to achieve a multiplier effect.First, the logical operator
Logical Volume Label
Express
What I want to say here is a few shell parentheses, braces and parentheses, the use of commands, as follows:1.${var}2.$ (CMD)3. () and {}4.${var:-string},${var:+string},${var:=string},${var:?string}5.$ ((exp))6.$ (Var%pattern), $ (Var%%pattern), $
Write a script with the shell at the same time monitoring multiple hosts (monitoring host whether online, CPU, memory, hard disk, IO use status, and have the mail notification function), the big God after looking at the wrong place or have a better
1. Gets the return value of the Shell function call:#!/bin/sh info () { cat jlb.sh} res= ' info ' echo ' state: ' $?echo ' res: ' ${res}description : res='info' This behavior calls function info, which conforms to ' not single quotes, but the
Linux Shell if parameterUsed in shell programming to determine parameters within an if statement–b return True when file exists and is a block file-C Returns True when file exists and is a character-D returns True when pathname exists and is a
While Condition;doStatmentDoneUntil Condition;doStatmentDonePractice:Write a script: every five seconds to see if JT has landed, did not login to continue to execute, landed the Stop command650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4
Source: (Linux Shell) Chapter One--Small trial sledgehammer (i.)Starting today, let's study the book "Linux Shell Scripting Raiders".1.1 Brief IntroductionA shell script is typically a text file that starts with #!, as seen in the
The operating environment of the Bash Shell:Configuration values are divided into the overall system configuration values and preferences of each person, only some files placed in different places!
Path and command search orderWhen a command (
What is a shell:The shell is a human-computer interface, so that humans can control computers, usually have a graphical interface and text interface of twoGraphical interface: Gui:graphic User Interface:WindowsIOS, AndroidX-windowGnomeKdeXfceText
In my best friend's recommendation, I watched this video:The Black Magic of SSHIn this video, we introduce some of the advanced applications of SSH, and in combination with the experience of the work, two types of questions will help us a lot in our
The shell is much more programmatic in terms of programming than Windows batch processing, both in loops and operations.Bash supports one-dimensional arrays (which do not support multidimensional arrays) and does not limit the size of arrays.
After adding some interceptor code, the CPU alarm shows that CPU utilization exceeds 100%.To find out exactly what code consumes too much resources, find a blog post from the Web, reproduced as follows:http://blog.csdn.net/guixunlong/article/details/
In general, the programming language can be divided into two categories: the compiled language and the interpreted language. Compiled languages many of the traditional programming languages, such as Fortran, Ada, Pascal, C, C + +, and Java, are
If condition judgment of Linux shell script, linuxshellIF condition judgment1. Basic Syntax:If [command]; thenStatements that meet this conditionFi
2. Extended Syntax:
If [command]; then
Statements that meet this condition
Elif [command];
Shell script learning and shell script1111111111111 clear the simple command script of the messages log file under/var/log/Var/log/the system file under the log file must have the root permission:$ UID is the global variable of the system:Make &
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