Basic working principle of Centos programming Shell

Basic working principle of Shell The most important system program provided by Linux is the Shell command language interpreter. It does not belong to the kernel, but runs in user mode outside the core. Its basic function is to explain and execute

Linux Shell programming (Basic tutorial)

1. Linux script compiling Basics1.1 Basic syntax IntroductionStart with 1.1.1The program must start with the following line (the first line of the file must be placed ):#! /Bin/shSymbol #! The parameter used to tell the system that the program is

Rsync-linux backup script

Compile as script The basic form of this script is from the rsync website. In fact, there is only one command: Rsync-force-ignore-errors-delete-excluded-exclude-from = exclude_file-backup-dir = 'date + % Y-% m-% d'-av Key parameters are: -Backup:

Linux shell array variables, types, and rules

There are two ways to assign values to an array variable: (1) name = (value1... valuen) The subscript starts from 0. (2) name [index] = value Arrays are a form of organizing several variables of the same type in order to facilitate processing in

Use shell commands to operate Memcached

Data storage (assuming the key is test and the value is 12345) Printf "settest005 \ r \ n12345 \ r \ n" | nc127.0.0.112000 STORED Data Retrieval (assuming the key is test) Printf "gettest \ r \ n" | nc127.0.0.112000 VALUE test 0 5 12345 END Increase

Shell password setting script when adding a user

Vi useradd. sh#! /Bin/bashI = 1While [$ I-le 5]DoUseradd red $ IA = 'sh./passwd. Sh'Echo "red $ I: $ a"> userpasswdEcho red $ I: $ a | chpasswdLet I ++Done Run sh useradd. sh. [Root @ 2 shell] # cat/etc/passwd | grep redRed1: x: 515: 515:/home/red1

Shell implements a simple process monitoring script

#! /Bin/bash NAME = java NOP =/bin/trueDATE = $ (/bin/date + "% Y-% m-% d % H: % M: % S ") ps-ef | awk-F "" '{print $8, $2}' | grep ^ java>/dev/null 2> & 1 case "$? "In0) # It is running in this case so we do nothing. echo "$ NAME is running OK.

Use mail monitoring ssh to log on to the User shell script

Wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz Tar xvf sendEmail-v1.56.tar.gzMusic sendEmail-v1.56 sendEmail Vi/etc/ssh/sshrc#! /Bin/shUser = $ USERIp =$ {SSH_CLIENT % *}If ["$ user "! = "Root"] | ["$ ip "! = "192.168

Commands related to shell time Retrieval

Linux shell get time and time interval (ms level) Note: When performing some performance tests, we sometimes want to calculate the time when a program runs, sometimes you may write a shell script to control the performance test (such as running N

Common Shell skills system running status

Shell commands related to the system running status:1. Linux real-time monitoring command (watch ):Watch is a very practical command that can help you monitor the running results of a command in real time, saving you the need to manually run it all

Automatically set using shell scripts to batch implement password-free login to hosts

The lab background is in a LAN, where a host is designated as the management machine and other hosts as the managed machine. For convenience of future maintenance, the management machine must be directly logged on to the managed machine without a

Shell game guess number

The generated password and user input can be repeated.Therefore, it may be much more difficult to guess general rules.Current version rules:A -- number pair, location pairB -- after excluding the result of A, the number is correct, but the position

Shell analyzes the region where the ip address in the apache log is located

Components used to Query IP addresses wget http://rfyiamcool.googlecode.com/files/nali-0.1.tar.gz tar zxvf nali-0.1.tar.gz cd nali-0.1 ./configure && make && make install The steps are similar to those of nginx, but the method for

Centos Security Protection Settings

There are a lot of spam on the network to scan the root account, so it is necessary to do a good job of security! The following are some security settings for reference only:1. Modify the SSH portVi/etc/ssh/sshd_configPort22

Plink latest tool full command line remote batch shutdown script

My operating system is centos6.4 Operating System: rhel 6.2 x86_64 Download and install the putty software package, I download the putty-0.62-1.el6.rf.x86_64.rpm Http://rpm.pbone.net/index.php3: 1. Remote Host IP list file [Root @ localhost ~] #

Senior Centos System Administrator network security experience

About partitions If a potential hacker attempts to attack your Linux server, he will first try Buffer Overflow. In the past few years, buffer overflow is the most common form of security vulnerabilities. More seriously, the buffer overflow

Configure iptables in Centos to defend against DDOS and cc attacks.

Recently, in order to ensure security for the launch of the project, it is necessary to defend against DDOS and CC attacks and capital problems of the company. Now, O & M engineers are writing scripts for use, only simple defense 1. View IP

Common Linux Security Settings

User Management User Permissions 1) Restrict root12 echo "tty1">/etc/securettychmod700/root 2) password policy1234 echo "Passwords expire every 180 days" perl-npe's/PASS_MAX_DAYSs + 99999/PASS_MAX_DAYS 180/'-I/etc/login. defsecho "Passwords may only

How to restrict su-permissions in CentOS

Because the root user has full operation permissions on the system, in order to avoid some mistakes, we recommend that you log on to the system as a general user. If necessary, you need root operation permissions, then, run the "su-" command to log

Use sudo in CentOS

The sudo tool can help you allocate part of the system management responsibilities to others without having to grant full root access permissions. It is a setuid program. You only need to enter your own password to execute the command after sudo.Use

Total Pages: 1330 1 .... 876 877 878 879 880 .... 1330 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.