The shell script implementation classifies files according to the time the file was modified _linux shell

#!/bin/bash # exctute #/mod.sh File_type input_folder Output_folder #/mod.sh Count I f [! $#-eq 3]; then echo "[ERROR] Error paramater." Exit Fi # File Type file_type= ' ${1} ' # input Foloder if [-d ' ${2} ']; Then folder= "${2}" Else echo

Ping discovers the shell code of the switch alarm _linux shell

Copy Code code as follows: #!/bin/bash ping= ' which ping ' Date= ' Date +%y%m%d%h%m ' Tail= ' which TAIL ' Log=./ping$date.log hosts= "selboo.com.cn 221.130.191.97" count=200 For MyHost in $HOSTS Todo count=$ (ping-c

Code _linux Shell to prevent repeated execution of shell scripts

For example, you might want to refer to the following implementation for a script that requires only sequential access to a resource, such as a disk file. Copy Code code as follows: #!/bin/bash # # File locking using Bash. # ver 0.1.6

Introduction to Shell comparison operations _linux Shell

Shell string Comparisons, judging whether it's a number Binary comparison operator, comparing variables or comparing numbers. Note the difference between numbers and strings. Integer Comparisons -eq equals, such as: if ["$a"-eq "$b"] -ne is

Shell script for viewing Linux memory usage _linux shell

In Linux, the/proc/$PID/status file provides the usage of the process resources (memory, stack, semaphore, child parent process), although Linux provides a lot of commands to view memory, but it's all about the overall usage and cannot view the

Background real-time streaming file shell script _linux Shell

Copy the files under the Bill folder to a certain rule (file name parity) under the Bill1,bill2 folder.Update BILL1,BILL2 Processing Progress tab (update File.max)File3 is the label for the current latest file in the bill directory and will normally

An interoperable concurrent ping detection script _linux Shell

Copy Code code as follows: #!/bin/bash #********************************# #2013 -01-11 17:00:00 wanggy Exp # #note:p ing Monitor # #********************************# Set-u Ping_fun () { d_network=192.168.1 Echo-n "Input" network

A shell-written ping function _linux Shell

Copy Code code as follows: #!/bin/bash #2013 -01-06 14:00:00 wanggy Exp #note:p ing Monitor Set-u #set-X Ping_fun () { d_network=192.168.1 Echo-n "Input" network (default $d _network): " Read Network : ${network:= $d _network} echo

Linux Split command detailed _linux Shell

command function : Cutting files, cutting files in units of behavior or in bytes command Syntax : Split [–help][–version] Split [-][-l , in number of rows Split [-B ][-c The output file name refers to the cut file as a prefix. 1. Cutting

Linux User forces initial password change at first logon _linux shell

The following describes how to force users to change their passwords the next time they log on. Each user account under Linux is associated with the various configuration and information associated with the password. For example, it remembers the

Linux/nginx How to view search engine spider crawler behavior _linux Shell

Summary SEO optimization of the first step is to let spider spiders often come to your site to patronize, the following Linux commands can let you know the spider crawling situation clearly. Below we analyze for Nginx server, log file

Linux Shell view current extranet Ip_linux shell

Function Fly Shovel is simpler, just get the extranet IP. Some sites are processed for Curl UA. Meet their own collection of addiction, collected a lot can be used to query the Internet IP URLs and methods. #国内某网站的接口, only return IP Curl ip.665

The sudo configuration of the Linux system _linux shell

Here today we discuss a very funny system configuration error in Linux systems, which is sudo, and why it's funny, because if it's improperly configured, it's easy for the average user to claim root, and without a bit of technical content, System

Get two-day-interval shell script code _linux Shell

Copy Code code as follows: #!/bin/sh # Get the first day of the quarter, the date interval to yesterday # link:www.jb51.net # DATE:2013/2/28 Day= ' date-d "1 days Ago" "+%y%m%d";year= ' expr substr ${day} 1 4 ';Month= ' Expr

Extract Oralce-day alert log shell script code _linux Shell

Shell script to extract alert log for Oralce day Copy Code code as follows: #/bin/sh #get Alert of Everyday #then name of file is everyday_alert.sh Dir= "/oracle/admin/bbdz/bdump" num=$ (cat-n ${dir}/alert_bbdz.log | grep "'

Linux bash string processing encyclopedia _linux Shell

Gets the length of the string Copy Code code as follows: Code: %x= "ABCD" #方法一 %expr length $x 4 # method Two %echo ${#x} 4 # method Three %expr "$x": ". *" 4 # Help for expr # String:regexp anchored pattern

Two shell scripts for backup databases _linux shell

A shell script that backs up a database Copy Code code as follows: #!/bin/bash #指定运行的脚本shell #运行脚本要给用户执行权限 Bakdir=/backup Month= ' Date +%m ' day= ' Date +%d ' Year= ' Date +%y ' Hour= ' Date +%k ' min= ' Date +%m '

Example of positional variable parameters (special characters) in shell script _linux shell

$#: Number of parameters passed to script$*: Displays all parameters passed to the script in a single string. Unlike positional variables, this option argument can exceed 9$$: The current process ID number of the script run$! : The process ID number

Linux Shell Implementation Daemon Script _linux Shell

Embedded beginners, the first time to upload code. Yesterday did a UDHCPD and Udhcpc Guardian, currently only with Shell imitation writing, what method can do guardian? #! /bin/sh #进程名字可修改 pro_name=udhcpc wlan=ra0 while true; # get

Linux shell script Implementation detects tomcat_linux shell

Linux shell script detects tomcat and restarts automatically Background Run command sh xxx.sh &View background tasks: JobsSummoned to the front desk: FG Jobs number The code that can delete the while loop is put into the crontab, and the script

Total Pages: 541 1 .... 530 531 532 533 534 .... 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.