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
http://blog.csdn.net/special23/article/details/52690057
Service-side programs generally need long-term background stable operation, in addition to ensuring the robustness of the program itself, but also need to use some daemons.
Now share a simple
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
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
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:/
In shell development, it's often used to date-related things, and here's how the Linux shell gets the date.
Get the current date: today= ' date +%y-%m-%d '
Get yesterday's date: yesterday= ' date-d '-1 day ' + '%y-%m-%d '
Get the date of N days
Spark Interactive scripting is a simple way to learn about APIs and a powerful tool for analyzing data set interactions.
The spark abstract distributed cluster space is called the Resilient Distributed DataSet (RDD) elastic data set.
There are two
Everyone must know how to get the sed into the shell variable
However, there is a problem with passing in the path variable.
#!/bin/bash
export vob=/home/fesu/server
sed-n '/^vob/{s/\ (vob=\). */\1 ' "$VOB" '/P} ' $VOB/scripts/build/ Makefile
The previous writing test program used scripts to raise interest, combined with specific cases, to test the results of learning. Finally understand a slightly more complex shell script. There are still a lot of technical things in there.
Declared
In shell scripts, variables are divided into two types, system variables, and custom variables.System default variables are some of the system's own variables, such as PATH variableUser-defined variables are some of the variables that you define
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
Common Linux directory names/The root directory of the virtual directory./bin binary Directory/boot directory. Store startup files/dev Device Directory/etc System configuration Directory/home directory, where Linux creates the user directory/lib
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
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
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.