The Shell Common Command summary under the Linux server

1.   Find        find Pathname-options [-print-exec-ok]  & nbsp;     Let's take a look at the parameters of the command: The directory path that the        pathname Find command is looking for. For example, to represent the current directory,

The absolute path of the directory where the shell script resides in Linux

The code is as follows Copy Code basedirforscriptself=$ (CD "$ (dirname" $) "; pwd)echo "full path to currently executed script is: ${basedirforscriptself}"Orfullpath=$ (CD "$ (dirname" $) "; pwd)echo "full path to currently executed

Linux shell Script monitoring site 80 port and site is normal

Monitoring website 80 Ports Many times we do not know whether the site 80 port is normal, of course, my previous Shell monitoring site status (continued) This article can also monitor the site, here is just to provide you with another way to

Use the shell to get the date n days before the specified date _linux shell

First, create test files test.sh #!/bin/sh ./etc/profile # Parameters: # Args[0], data date, date format Yyyy-mm-dd # Take 30 days before the date function Get_date_ 30daysbefore () { sec= ' date-d $ +%s ' sec_30daysbefore=$ ((sec-86400*30))

Every day a linux command locate command _linux Shell

Locate allows users to quickly search the file system for specific files. The approach is to create a database that includes all the file names and paths in the system, and then simply query the database when looking, without actually going into the

Linux shell Implementation Transform input date format _linux Shell

For the user to enter the validity of the date test is a very important issue, this example is simple to get the user entered the date, and converted to the appropriate format, but not perfect, why please read the text. #!/bin/sh #

One day a shell command Linux text Operation series-tac,rev command detailed _linux Shell

Description TAC and Rev are not necessarily connected, the only same is that they are "villains". TAC is actually cat's reverse write, cat normal output, the TAC is inverted output, but the last line from the line output, that Rev? Rev is the last

Linux server hardware running status and fault message alert monitoring script sharing _linux Shell

Monitor hardware Health Shell monitor Cpu,memory,load average, log to log, when load pressure, email notify admin.Principle:1. Get the value of the Cpu,memory,load average2. Determine whether the value exceeds the scope of the customization, for

Summary of mathematical calculations in shell _linux Shell

sin

1. Examples of error methods A Var=1+1 Echo $var The result of the output is 1+1, tragedy, hehe b Var=1 var= $var +1 Echo $var The output result is 1+1, still tragic, hehe 2. The correct method 1) using Let Var=1 Let "Var+=1" Echo $var The output

Linux and Windows automatic FTP script (shell bat) _linux shell

First, look at the Linux under: Copy Code code as follows: #! /bin/bash cd/ftp/ Currentdate= ' Date +%y%m%d ' Yesterday= ' date-d yesterday +%y%m%d ' Threedayago= ' date-d ' 3 days ago ' +%y%m%d ' #echo $TWODAYAGO Ftp-n-I 34.97.34.3

Shell script for detecting network segment IP usage _linux shell

Copy Code code as follows: #!/bin/bash #main--- network=192.168.1 Ping_count=3 Ip=1 : >ip_use : >ip_idle : >ping_action echo "' Date" +%y%m%d%h:%m:%s "'-----> Script starts executing ..." While [$IP-LT 255] Todo host= $network. $IP

Shell command shortcut keys

In the shell command terminal, CTRL + N equals the direction-down direction key, ctrl+p the direction key that corresponds to the direction.   in the command terminal through them or the arrow keys can be used to quickly find the history command.

Linux shell string manipulation

Ext.: http://justcoding.iteye.com/blog/1963463String-related operations are often involved in the shell batch process. There are a lot of command statements, such as: awk,sed can do string various operations. In fact, the shell built a series of

Shell breach Security Dog Remote Desktop daemon

First, under the shell, configure the Security dog installation to the default installation path:C:\Program files\safedogserver\safedogguardcenter Find proguarddata.ini download file to local virtual machineThe virtual machine installs the security

Conditional judgment in shell programming (Shell 05)

Conditional judgment in shell programmingConditionsIf-thenCaseIf-thenSingle conditionif commandThenCommandsFiWhen the command return code is 0 o'clock, the condition is setif.sh#! /bin/Bashif Date Then Echo "command EXEC"fiifdate123 Then

Linux FTP Remote backup shell script command

Regularly back up each server's shake data, to the FTP server, pay attention to the active mode and the passive mode difference#!/bin/bash# active FTP is beneficial to server, client iptables shutdown, client needs to execute Passsiveh after

Linux operating system shell and functions

definition of shell and function1. Linux Shell functionsform a set of command sets or statements into an available block, These statement blocks are called functions. 2. composition of Shell functionsFunctions Name: Function names, note that the

Shell Note 8

A function is the name of a command or a set of commands. Functions can make the program modular, thus improving efficiency. The shell stores functions in memory rather than in disk files, so accessing the function is much faster than accessing

Shell function definition and application

1. Function IntroductionFunctional function is a block of statements consisting of several shell commands for code reuse and modular programming.It is similar to the shell program, but it is not a separate process, it cannot run independently, but

To partition a hard disk using Shell scripting Automation

In a Linux system, you can use FDISK to partition the hard disk, but to manually execute a lot of commands, it is cumbersome to use, and now remember that a script with Fdisk is automatically executed.1 #make Partition2Ddif=/dev/zero OF=/DEV/MMCBLK1

Total Pages: 541 1 .... 142 143 144 145 146 .... 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.