Shell script implementation turns off redundant TTY terminals _linux shell

Today to optimize the company's new deployment servers, found that the TTY terminal has 6, in order to save a bit of memory, decided to leave only a TTY terminal, the others are off, but CENTOS6 and centos5 terminal closure method completely changed,

Shell script sharing for server information (Ubuntu, CentOS test pass) _linux Shell

This script has been tested on the Ubuntu and CentOS versions, and the script is as follows: Copy Code code as follows: #!/bin/bash Line= ' =========== ' #linux发行版名称if [[-f/usr/bin/lsb_release]]; Thenos=$ (/usr/bin/lsb_release-a

Shell script implementation to prevent foreign IP access server _linux shell

Customer requirements, do not want to allow foreign IP to access the server, would have to let the computer room in the upper route to solve, but those people do not bird you!!! ~~~~In this case, you can only use iptables to solve the ~~~~~~~~~About

Shell script Implementation Analysis The area where IP resides in the Apache log _linux shell

Components used to query IP addresses Copy Code code as follows: 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 and Nginx are

UNIX programming create prefix fixed temporary file code share _linux Shell

Parameters:Pathname, the path file name of the temporary file is stored, and the manual free () is required.Dir, the path to the temporary file, if the TMPDIR environment variable is not empty, this parameter is ignored and the environment variable

How to change the way Linux users log on to the shell _linux shell

1, look at the machine installed which shell? There are two ways to view it. First type: [Rocrocket@wupengchong ~]$ Chsh-l/bin/sh/bin/bash/sbin/nologin/bin/zsh The second type: [Rocrocket@wupengchong ~]$

Use of case in shell learn notes _linux shell

Case statements in the shell:You can match the contents of a variable with multiple templates, and then decide which part of the code should be executed based on a successful matching template. Use format:Case matching Parent board inTemplate 1 [|

Linux shell logical operators, logical expressions detailed introduction _linux shell

One, logical operators Logical Volume Label Express meaning 1. About the files and directories of the detection of logical labels! -F Common! Detect the existence of "archives" eg:if [-f filename]

Linux link compilation detailed _linux shell

Why should I include a header file instead of a. c file Test code: Copy Code code as follows: M.C file: #include "t.c" int main () { Test (); return 0; } Compile: Copy Code code as follows: GCC M.

Shell script emulates multithreaded feature sharing _linux shell

Copy Code code as follows: #!/bin/bash function Pinghost { Ping $1-c 1-w |grep rtt|cut-d "/"-f6 } Tmp_fifofile= "/tmp/$.fifo" # script runs the current process ID number as filename Mkfifo $tmp _fifofile # Create a new random FIFO pipeline

25 Useful shell Scripts Common command sharing _linux shell

ssh

1. List all directory usage and sort by size. Copy Code code as follows: Ls|xargs Du-h|sort-rn #不递归下级目录使用du-sh 2. View the file exclusion with the # switch and blank line, suitable for viewing the configuration file. Copy

Using shell script to quickly build the Nodejs development environment under Ubuntu _linux Shell

Nodejs is really very hot, before the past, but never seriously recorded anything. Build its development environment under Ubuntu Try a quick, easy way to get the system to automatically help you install what you need, and we'll generate a shell

Shell script 3 Implementations of batch renaming file suffixes _linux shell

Today suddenly think of a problem has not hands-on practice, is the use of Shell batch modification file suffix, now hands-on practice. Requirements: The home directory has some SQL files, want to bulk renamed into TXT 1, find + xargs +sed

Shell Script Array Usage Summary _linux shell

Array as a data structure, in some high-level languages are directly provided and implemented, of course, my shell is also some ha. PS: This article is written because brother B in the group sent a screenshot: My big B elder brother is still

A summary of 6 characteristics of shell custom functions _linux shell

The recent systematic study of the shell function, the overall sense of the root of the other language function is similar, but it also has its own characteristics One, the call function must be defined after the function, or it will be the error

The use of single quotes (') and double quotes (") in shell scripts distinguishes _linux shell

When you write a shell script on a Linux operating system, we use the $ symbol in front of the variable to get the value of the variable, usually in the script using the "$param" in a double quote format, but there are also the use of the ' $param '

Shell sh How to back up log files every day

#!/bin/bash # Daily BACKUP log file log_path= "/home/fdipzone/logs" # Log directory Backup_path= "/home/fdipzone/logs/bak" # Backup directory ex PIRE=30 # Backup file only retains 30 days function backup () {if [-d ' $log _path] && [d] $backup _

Linux-shell script command: Introduction to grep command

[grep Introduction:] grep is used to filter rows that contain specific characters, and to use regular expressions to search for text that is selected in positive behavior units when looking up a string in the data. Usage: grep [Cinvs] ' pattern '

Shell's Case-esac

Case ... Esac is similar to the switch ... case statement in other languages, and is a multi-branch selection structure.The case statement matches a value or a pattern, and if the match succeeds, the matching command is executed. The case statement

Shell experience A

What is a shell, what can you do?1. ProceduresNarrow: Operating system programs and applications.The operating system program is used to invoke the monitoring kernel, which runs all the programs we can apply on this operating system.The operation of

Total Pages: 541 1 .... 181 182 183 184 185 .... 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.