The Linux terminal executes to delete the invalid link file.
Copy Code code as follows:
#!/bin/sh
Usage (){echo "Removebroken 0.1, a shell script to remove broken link files."echo "License:mit, (c) Chenzhiqiang"echo "Usage:"echo "$--
Copy Code code as follows:
#!/bin/bash
Path=/bin:/sbin:/usr/bin:/usr/sbin
Export PATH
I=1
While [$i-lt] #硬盘数量, 12 blocks apart from the system disk
Todo
J= ' echo $i |awk ' {printf '%c ', 97+ $i} ' #系统盘是sda, if the other needs to modify
A script to compress the picture, install the #imagemagick# first
Copy Code code as follows:
#!/bin/bash
# yum Install ImageMagick
# Cd/img/dir
for file in */*.jpg; TodoTo_middle_file= "${file%.*}_m.${file##*.}"; FileName plus
1) Statistics the number of files under the current folder
Copy Code code as follows:
Ls-l |grep "^-" |wc-l
2) Statistics the number of directories under the current folder
Copy Code code as follows:
Ls-l |grep
This blog is simple to look at the loop statements that Shell programming uses, including for loops, while loops, until loops, for behind and a variable, and then a collection that assigns things to this variable, each loop, like a foreach in Java.
Recently, just need to test the stability of the new station, so write a shell script to the local (recently changed MAC), to real-time view you need to monitor the status of the Web page, and sent to the designated mailbox.
Here's a compliment. OS
Once run, the warehouse on the Gitolite server can be backed up to the local. The first run creates a local mirror of the remote warehouse, which updates the local mirror each time it runs.
This program only supports SSH mode
Other GIT servers do
A sensitive user here means that the user belongs to more than one group, or that the user belongs to a group name that is not the same as the user name.
#! /bin/bash
#list user who belong than one group
#and list user who belong to the
This paper briefly introduces the method of installing Gearmand and starting under rhel5.7, for everyone to study for reference!
First of all, to the official website https://launchpad.net/gearmand/Download Gearmand source package, uploaded to the
If you need to write a section to interact with the user, and need to input some sensitive information (for example: User password, license, etc.), the direct use of printf+read, the user input information will be displayed on the screen, which is
There are times when you need to extract files from the RPM package without installing and installing RPM-related libraries and programs, and this little green script can help you achieve your wish.
Note:1. This script comes from the Internet, the
Copy Code code as follows:
#!/bin/bash
# march-13-2006# Cpuuse Trigger script by Noel## Bash code to watch a running program ' s CPU usage.# if it ' s above a set value, it'll auto send an email.# You'll need to set a Cron job to run this
When dealing with some data files on Linux, it is sometimes necessary to filter out the empty rows, and the various tools available in the system can accomplish this function. The usual introductions are as follows:1. grep
Copy Code code as
Often need to statistics Apache site traffic based on the IP address, the most basic script.
In descending order based on IP traffic:
Copy Code code as follows:
#!/bin/bash
#Script_name: Access_count
Access parameters
You can visit the command-line argument via PROCESS.ARGV, which is an array containing the following:
[Nodebinary, Script, arg0, arg1, ...]
That is, the first argument starts with Process.argv[2], and you can iterate through all
Wscript.Shell (Windows Script Host Runtime Library) is an object, and the corresponding file is c:/windows/system32/ Wshom.ocx,wscript.shell is a component that the server system will use. Shell is the meaning of "shell", this object can perform
The && operator syntax is formatted as follows: Command1 && command2 [&& Command3 ...] 1. Use && connection between commands to implement logic and functions. 2. Only the command on the left of && returns True (command return value $?). = = 0) The
A system that encounters a non-Dubbo framework in a project needs to dispatch the tasks of the Dubbo framework system.Tried the expect method, need to install TCL and expect Linux.First Dubbo The official documentation mentions the way Linux calls
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