The company server has been dying for the last two days because of the full memory usage. Really can't stand the old call room to help people to restart, specifically wrote a script to release the memory, of course, this server is not too important,
When you download the SVN code on a Linux server and sync it to a web directory, you'll need to clean up the folder and add a little security to your safety.Script content:del_svn.sh
The code is as follows
Copy Code
I. Management of the Document System
Tips: When you enter a command, you need to use the TAB key to complete
LS View directory information (LS/)
Ls-l equivalent to LL
PWD View the path that is currently in place
CD switch directory (CD/) and
Recently write script, need to intercept the path parameter that function passes in the script, discover the following more useful method, record below:
File=/dir1/dir2/dir3/my.file.txt
We can replace each of the different values with ${}:
${file#
Environment: Successful in 2KSERVER+IIS5, permissions default IUSR permissions
IIS permissions: Script executable Description: On a 2K server, you can use the Server.CreateObject method to work with installed components by default.
For example, you
Presumably, anyone who knows makefile knows that makefile can invoke a shell script. But when it's actually used, it's not that simple, and some ambiguous places can make you mad. If you don't believe it, you can take a look at a few examples,
To turn the "functions in" chapter into a "library for", "scripts, extract all the functions and Concatenat e them into one of the big file. If We call this file library.sh, a test script so accesses all of the functions might look like this:
Name
WC is a tool for statistics, all spelled as: Word count (Word statistics)
Instance:
1. Statistics of rows
$WC –l File
2. Statistics of words
$WC –w File
3. Statistics of characters
$WC –c File
4. Number of characters in the statistical
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
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
You can use the SCP command when you want to transfer files between two Linux hosts, without entering a password after establishing a trust relationship. Copy your local host user's SSH key file to the remote host user's ~/.ssh/authorized_keys file,
When the old horse wrote this version, I tested a simple reproduction of two 2003 version, when it is easy to use. I guess it's probably about 2003 dozen ms06014 patches. Kyo the solution at the freezing point forum, I studied this component this
If, for, while almost all the keywords in all programming languages, in Shell programming is no exception, where if is the most frequently used, because shell programming does not exist in the concept of objects (object), so in the comparison of the
Linux access to new Gmail Mail via command line without entering @gmail.com part
#!/bin/bash
num= "\033[1;36m"
end= \033[0m "
read-p" Enter your mail: "Name
read-p" Enter Pass of Mail: " Pass
atom= ' wget-qo-https://$name: $pass
The definition of a variable can only begin with a letter and an underscore, case-sensitive, and may contain a numeric letter underline. See Official Handbook
Copy Code code as follows:
[Root@svn shell_example]# yourname= ' Linux '
[
About the shell in the for loop usage a lot, always want to sum up, today on the Internet to see a summary of the use of the loop, feeling very comprehensive, so turn around research, HEI ...
Copy Code code as follows:
For
If you're dealing with a shell script and it's a common thing to traverse a time range, share it with you today:
Copy Code code as follows:
#!/usr/bin/env Bash
Date1= "$"
Date2= "$"
echo "Date1: $date 1"echo "Date2: $date 2"
In the previous example of Shell programming, it was mentioned that the shell script was extended and redirected to a file for viewing and debugging http://www.jb51.net/article/62435.htm. However, if there is another situation: redirect only in some
Determines whether a specified script is a syntax error, and if there is an error, prompts the user to type Q or Q to ignore the error and exit, and any other key can open the specified script via vim;#! /bin/bashScript_file= "./test.sh"Sh-n $script
Nginx service startup script The code is as follows:Copy code #! /Bin/sh# Chkconfig: 2345 55 25# Description: Startup script for nginx webserver on Debian. Place in/etc/init. d and# Run 'UPDATE-rc. d-f nginx defaults', or use the appropriate
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