One day a shell command Linux file content Operation series-cat command detailed _linux Shell

Note: After the awk command, there are not too many complex commands, which are basic commands. Description Cat, which is the abbreviation of the word concatenate, outputs the contents of the file to stdout. When the redirection operator (> orWhen

One day a shell command Linux text Operation series-tree command detailed _linux Shell

The tree command is the protagonist of printing files and directories in a graphical structure. This command is not normally included in Linux distributions. You need to install it yourself with the package Manager. Instance: 1. Tree Print all

Sharing several tips in shell programming _linux shell

1. Print some header informationCommand ............Dilimiter The standard input of the command as the content of the boundary symbol DilimiterCommonly used in the echo command, this avoids the need to use an echo command without outputting a line,

A shell script _linux shell with statistical CPU memory hard disk usage

Copy Code code as follows: #!/bin/bash #This the script is Usage for describle CPU Hard memery Utilization Total=0 Idle=0 System=0 User=0 Nice=0 Mem=0 Vmexec=/usr/bin/vmstat Which SAR >/dev/null 2>&1 If [$?-ne 0] Then Ver= '

sed or awk processes the implementation of the last line of a file _linux shell

Like the following text:ABCD 1234 FDS2011 5501023 832er 1231 The request is processed as follows:ABCD 1234 FDS2011 550total1:1023 Total2:832er 12end Determine if the last line of text is preceded by the first column with Total1: The second column

Example detailed linxu df command _linux Shell

DF, free disk, is used to display the disk usage of the file system. By default, the DF command will display all currently mounted file systems in each 1K unit, if you want to display the output of the DF command in a human readable format, such as "

A ping detection alarm function Code _linux Shell

Copy Code code as follows: #!/bin/bash Ping_monitor () { host_= (203 204 205 207 208 209 210 212 213 214 215 216 217 218 219 220-221) Ping_count=3 called= (13000000001 13000000002 13000000003) calling=13000000000 callop=1310000000 #main-

Delete a Web site with the shell command the latest NB method and code _linux

Copy code code as follows: # Is it really a headache, or do you want to write a shell script to get rid of these scripts Copy Code code as follows: #!/bin/sh LS $1/*.htm | While read file Todo Sed-i-E "/if (

The shell implements the text to be heavy and the original order _linux Shell

In simple terms, this technique corresponds to the following scenario Suppose there is text as follows Copy Code code as follows: Cccc Aaaa bbbb dddd bbbb Cccc Aaaa Now it needs to be processed, this is simple,

Two-segment shell script that counts network card traffic (using ifconfig) _linux shell

Use shell script to compute the Linux NIC traffic, the most critical point in the method: Copy Code code as follows: Ifconfig $eth _name | grep bytes | awk ' {print $} ' | Awk-f: ' {print $} ' The flow of input and output is

Shell Programming Basics Summary _linux Shell

1, File type introductionLinux systems mainly include the following seven types of files: D directory-normal file L Symbolic link s socket file B block device file c character device file p named pipe file 2, Regular expressionRegular expressions

Several common Linux operating system monitoring script code _linux Shell

This paper introduces several common Linux monitoring scripts, which can realize the automatic monitoring and alarming of host network card traffic, system condition, host disk space, CPU and memory usage. According to their own needs to write a

Using shell script to realize automatic switching of intranet and extranet to achieve high availability _linux shell

The first description of our configuration file, are similar format, if the intranet is 192.168.0.3, the extranet is 123.123.123.123, the configuration file is as follows: $db [' salver '] [' hostname '] = ' 192.168.0.3:3306 ';$db [' salver '] ['

Linux uses rinetd to implement port forwarding _linux shell

Port forwarding under Windows is typically a self-contained NAT and Porttunnel, Portmap Linux Lower port forwarding mapping program called RINETD, boot method rinetd-c/etc/rinetd.conf, Pkill rinetd shutdown process Tools Home:

Shell script reads text file line by row (without changing text format) _linux Shell

There are many examples of shell script-reading text files on the web, but they don't tell the whole story, only half of it. For example, read a text line from a testfile file in the following format: Copy Code code as follows: $ VI

The setting method of ignoring case in Bash shell _linux Shell

Most people will change it when they use Bash, because the default settings are really hard to use. Refer to the following ~/.INPUTRC settings: Copy Code code as follows: # don't show hidden files in the list Set Match-hidden-files off

In the shell script, implement switch user and execute command operation _linux Shell

Today, my company colleagues came to me and said that I was going to execute the Python script on the server with another user, but it was always done by the root user in the crontab, so I thought of a lazy way to use the shell script to switch to

Shell script automatically updates hosts to achieve wall-free access to Google_linux shell

The last time we sent a Python update Google hosts script, today saw someone sent a shell to get Google hosts script, I took to a slightly more simple processing, the following gives you the shell version of the update of Google hosts script.

Shell Implementation Force free memory script share _linux Shell

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,

How various parentheses are used in the shell _linux shell

What I want to say here is the parentheses in several shells, the braces and the bracketed variables, and the use of the command, as follows: 1.${var}2.$ (CMD)3. () and {}4.${var:-string},${var:+string},${var:=string},${var:?string}5.$ ((exp))6.$

Total Pages: 541 1 .... 190 191 192 193 194 .... 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.