The method of encrypting shell/.sh script under CentOS

But shell scripts are readable and writable, and are likely to reveal sensitive information, such as user name, password, path, IP, and so on. Similarly, sensitive information is leaked when the shell script is run. SHC is a tool for encrypting

Using shell to periodically clean up Web cache data scripts in Linux

After testing, the script does not set up!! The site uses a number of methods to accelerate (REDIS\CDN), this reduces user access to back-end MySQL pressure, as well as the front-end speed is not very good problem, the user requested to all the

Shell script statistics in Linux page traffic in Apache log

Requirements: There are two pages in the program for a purpose, and now you need to count the number of visits per minute between the two pages, including total hits, number of successes (status code 200), and number of failures. Then write to MySQL.

Linxu the file shell script before the specified time is deleted

Recently the World Cup has come, has been busy between work and the World Cup, there is no time to manage my blog, today can only be the whole simple small shell to everyone. The company asked to delete one months before the backup file, so that the

Shell date to timestamp in Linux

The way to get timestamps in the shell is: date-d "$currentTime" +%s If you want to convert a date to a timestamp, you would do the following: 1. Get the current time Currenttime= ' Date ' +%y-%m-%d%h:%m:%s ' 2. Convert date to time stamp

Use shell script to modify account password in Liunx

Single modification: The code is as follows Copy Code echo test:23456 | chpasswd Batch modification: First in a text file (assuming the name Users.txt) to prepare account information, the format is "account:

Two very detailed shell instance code _ other

Two very detailed shell instances General programming steps Now let's discuss the general steps to write a script. Any good script should have help and input parameters. and write a pseudo script (framework.sh) that contains the framework structure

Use shell script to ping the name of the corresponding IP (recommended) _linux shell

#!/bin/bash a= (Dick Harry Zhao Liu) for i ' {0..3} do if Ping-c 1 192.168.1. $ ((${i}+1)) >dev/null 2>& 1;then Echo $ ((${i}+1)) "${a[${i}]}" online " else Echo $ ((${i}+1))" "" ${a[${i}]} "offline" fi Done This string of shell code implements

Bash Shell programming Exercises

1. Create the executable file t2.sh and print "Hello world!"[Email protected] ~~ $ cd tscripts/'#!/bin/bash' >>' echo "Hello world!" ' >>~/tscripts $ chmod +x *~/tscripts $./t2.sh Helloworld!2. Methods to run the executable file in 3[Email

Shell Scripting Learning (iii)

Shell echo CommandDisplay Normal string:echo "I am cat_crazy."Note: The double quotes here can be omittedShow escape characters:If you want to output quotes, the * number needs to be escaped to output, as followsecho \ "I am cat_crazy\"The output is

shell--record an advanced level of personal script

This script is used in the common shell syntax of the work, the trivial grammar together can help to deal with work, liberation of manpower.The main common shell knowledge points: Determine if the parameters exist and determine the number

Shell Text Processing

1. Document CollationWork number and name are recorded in the employee fileEmployee.txt:Jason SmithJohn DoeSanjay GuptaAshok SharmaRecord work number and salary in bonus fileBonus.txt:100 $5,000200300 $3,000400 $1,250Requires merging two files and

Shell Contact 2

See if there are any custom users (ordinary users) on your Linux system, and if so, how many are there?[email protected] ~]# cat 6.sh#/bin/bashN= ' awk-f: ' $3>=500{print '/etc/passwd |wc-l 'If [$n-gt 0];thenecho "$n Common users"Elseecho "No common

Linux Shell Usage Summary

Why do scripts use the./+ script name to execute the scriptUnderstand:Because if the script name is used directly, then the Linux system will go to path path to findsuch as go to/bin usr/bin, such as find, this time will not find the script name,

Shell implementation of multi-level menu scripting

This article mainly introduces the shell implementation of multi-level menu system Installation script instance sharing, this script with multi-level menu to achieve lamp, LNMP installation display effect, the need for Friends can refer to:Hint:

Shell Judgment Statement

1. String judgmentSTR1 = str2 When two strings have the same content, length is trueStr1! = str2 True when string str1 and str2 are not equal-N str1 True when the length of the string is greater than 0 (string non-null)-Z str1 True when the string

Peanut Shell Use Tutorial

Inadvertently see the router inside there is a dynamic domain name, and later on-line a check that it is possible to establish a personal website, and then allow other users on the network to access their own servers, such as their own establishment

Configure shell script for nginx startup in linux

1. Added the shell script vi/etc/rc. d/init. d/nginx. The code is as follows:Copy code #! /Bin/bash# Chkconfig: 35 85 15# Description: Nginx is an HTTP (S) server, HTTP (S) reverseSet-ePATH

Use shell scripts in linux to cut logs for tomcat and nginx

Online servers generally encounter a variety of log cutting. Similar detailed script articles have not been published before. This time, we will make up for the relevant content of the website. The following describes how to cut two logs, and how to

Total Pages: 541 1 .... 350 351 352 353 354 .... 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.