1, shell overview
Each person after successfully logged on to Linux, the system will appear a different hint symbol. For example, $, ~, #等, and then you can start typing the command you want, and if the command is correct, the system will execute
2017-10-04 Add background account:
Suse10, Huawei Veneer, the first four methods are small white in the actual Linux environment test results, may be the difference between Linux version, and not all scenarios are compatible ... Another small white 2
The Find command tool is used to locate files in the directory (or even the entire file system), search Path_name-option [-print-exec-ok] #find的一般格式;
1, Find command Options (-option)
1.1. Find files and directories by name (-name):cb@standalone14:~
#!/bin/bash function ergodic () {for file in ' ls ' if [D-$ '/' $file] then ergodic '/' $file else echo '/' $file >> b fi Done} init_path= "/etc/httpd" ergodic $INIT _path
Some netizens replied: "If you only traverse the directory and create an
to write a shell program in Linux and perform the steps
Brief Introduction
I am the first time to write a blog, do not know what should be the format and precautions, please advise.
Today is about how to create a script and run it in a Linux
First line:
the first line of #!/bin/bash-e indicates that the following script is processed with bash syntax. Because most Linux defaults to bash, you can not write this line.
The parameter-e indicates that once an error occurs, the current shell
Introduction to Shell arrays
Time: 2008-01-23 10:57:33 Source: Linux Federation Collection collation Author:
You can also use array variables in bash, which are assigned two types of values: (1) name = (value1 ...
Feature Description: change the group to which the file or directory belongs.
Syntax Description:chgrp [-cfhrv][--help][--version][owned group] [file or directory ...] or chgrp [-cfhrv][--help] [--reference =][--version][file or directory ...]
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 '
Spark-shell-Initiated problem solving
Today in the start of the Spark-shell model of the wonderful appearance of the following several problems
1 Port occupancy: 4040 Port is occupied, we know that 4040 is the worker's port use, but is occupied, as
What does it mean in the shell that we will see the symbols of $ , $, and $? Simply put is the name of the shell script that you wrote, the first parameter you wrote to your shell script, and the second parameter that you wrote for your shell script.
One$BASH The path of the Bash 's binary program file Two$BASH_ENVThis environment variable will point to a bash startup file that will be read when a script is called.Three$BASH_SUBSHELLThis variable is used to indicate the level of the child
1, write script/root/bin/systeminfo.sh, display the current host system information, including hostname, IPV4 address, operating system version, kernel version, CPU model, memory size, hard disk size2, scripting/root/bin/backup.sh, can be
1. IntroductionShell, the Chinese name shell, is used to describe the relationship between the user, the operating system, and the hardware.The computer can not operate without hardware, but the user can not directly operate the hardware, the
Most basic: Remember the previous:#!/bin/bash, and the file suffix name is generally. shVI HelloWorld. SH #!/bin/bashecho"helloworld"Then remember to add permissions to the script, because the default is read and write permissions, default to all
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,
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