[Linux--shell]linux under the tree command detailed __php

Reproduced from: http://blog.csdn.net/askbai666888/article/details/9995837 (1) tree-a display all files and directories (2) tree-d display directory name rather than content (3) Tree-f displays the full relative path name before each file or

Linux Shell script Programming--cut command __HTML5

Cut-and The Cut command extracts text columns from a text file or text stream. Cut syntax [root@www ~]# cut-d ' delimited character '-f fields The PATH variable is as follows [Root@www ~]# echo $PATH /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/

Look at the world through the shell

Echo is similar to the LS command. Many functions can be implemented through regular expressions. For example, we can use echo. * To display all the files under the current folder, but by using echo-d. [!.]? * You can remove the current

Shell Script 1--View today's updated/created files

#!/bin/bash # This are a Shell script to find the files created by today # # Usage are: # # test.sh # function Recurce () { CD is #进入该目录 for file in *; #对目录中的每一个文件都逐一检查 do if [d "$file"]; then

[Shell] uses the Find command to locate recently modified files __ Memo Material

Find command: Search for files in specified directory commonly used option: -name: Specify the filename, or use "*.py" to specify the suffix name of the file, such as searching all the py files under the/home directory Find/home-name ' *.py '

Shell script Programming Related 1

Definition and use of 1.shell variables my_dir= "/home/yk/desktop"   # ( any character in single quotation marks is output as is, the variable in the single-quote string is not valid;)Echo $my _direcho ${#my_dir} #获取字符串长度2.shell annotations Single

The specified declare of the shell's advanced variable

DeclareSet - R Read-only     -I set shaping     -A array Let the specified function be an array      -F function If used in a script without declare -f any

The shell's parent-child process

January 11, 2017, Wednesday Shell parent-child processStart/execute mode:Current shell: #!/bin/bash must start at the beginning                        the first line of #! Will be discovered by the kernel, is a magic number , the kernel will

Simple shell command

System variables, display all variables of the current shell set reference variable $ plus variable nameGlobal variable: Export variable nameAssign the return value of the command to the variable: a= ' ls-la ' inverted quote equals a=$

01-shell Basic Overview

The shell is a command interpreter Shell scripts are similar to batch programs under a DOS system (disk operating system) The Shell scripting language is ideal for working with plain text types of data (configuration files, log files) The

Shell Scripting--03 Automated Deployment

1. RequirementsServer Master Agent Envtype8.0.0.1 8.0.0.11 8.0.0.111 AAA8.0.0.1128.0.0.12 8.0.0.1138.0.0.1141. Get the list of machines in the document/etc/ansible/hosts[Server][Master][Agent]2. contract to target Machine2.1 Send flask to all

The start of the shell

Beginners, do not consider the good-looking, high efficiency is not high! Need to meet the needs first! Demand is the first place!grep, SED, awk. Three Musketeers!Learn the shell, need the premise!1.linux System Command Proficiency2. Figure out the

[Shell] Implements script execution results matching a string

Today I received a request that a string be included in the result of the script execution and asked to find out.The idea I gave was to write the text in an appended way according to the name of the script and the result, and then find the

Shell implementation Multi-threaded (multi-tasking)

Implementation scenario: 1. Add:& at the end of the command#/bin/Bashall_num=Tena=$(Date+%h%m%S) forNuminch`seq 1${all_num} ' Do { Sleep 1 Echo${num}}& Doneb=$(Date+%h%m%S)Echo-E"starttime:\t$a"Echo-E"endtime:\t$b"With the & symbol at the end

Shell deletes empty or blank lines in the file.

Today, we found that there are too many empty lines in a file and we intend to delete them. So I used SED and checked the command to write it like this: Sed '/^ $/d' file1 I found that there are still a lot of blank lines in the output content,

Human Ware. Shell (company)

Why do we have to work overtime, not occasionally. If a large number of people work overtime due to our ability problems, we can only say that the HR department has recruited the wrong person. We should not come here to dismiss us. How many

Several shell assignments in Linux

1. Find the number of times "Linux" appears in the file sample.txt #! /Bin/bash # How many "Linux" in linux.txt? Grep-o "Linux" linux.txt | WC-lgrep-c "Linux" linux.txt 2. Retrieve the first column (User Name) of/etc/passwd and use "the N

How to obtain random numbers in Shell

From: http://standalone.javaeye.com/blog/511101   1. Use the shell variable $ randomEcho $ random 2. Use Random Functions of awkAwk 'in in {srand (); print rand ()}' 3. Use the System Device File/dev/random and/dev/urandomDd If =/dev/random | OD-

Linux Shell programming from beginner to proficient in exercises answers after class answers (Chapter 8)

This book has no answer. If you send an email to the author, he will not provide the answer. So I had to answer the question myself. Chapter 5 5.1 Q Cai-English-1984-Jiangsu-7 Q Cai-English-1984-Jiangsu-7 Q Cai-English-1984-Jiangsu-7 Q Cai-English-19

Changing the path in Shell

You often need to switch to a common directory, but the path is long and hard to remember. You want to use a script to enter the directory, but it will never change ....... Cause analysis: When the script is executed, only a sub-process is

Total Pages: 541 1 .... 510 511 512 513 514 .... 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.