The full syntax format for the Find command is as follows:find [path] [options] [tests] [actions]
PathThe path section is easy to understand: You can use either an absolute path, such as/bin, or a relative path, such as. 。 You can also specify
1. Shell to determine the file, whether the directory exists or has permissions2. #!/bin/sh3.4. Mypath= "/var/log/httpd/"5. myfile= "/var/log/httpd/access.log"6.7. # the-x parameter here determines whether the $mypath exists and has executable
Often in contact with the Shell scripting language, you will often see a shell command followed by a bunch of messy option, similar to the sed-e "s/^[^\-]*-//" , although know that it must be a logical combination of conditions, but if not familiar
Overview:The process class is an abstract class (all methods are abstract) and encapsulates a process (that is, an executing program).The process class provides a way to perform input from the process, perform output to the process, wait for the
#!/bin/bashtext= ' host_list ' line= ' awk ' 1 ' host_list|wc-l ' for ((i=1;iCat Host_list192.168.209.133 Root 123456This article is from the "Eight Miles" blog, so be sure to keep this source http://5921271.blog.51cto.com/5911271/1582833Shell
1. View memory from large to small arrangementPS-E-O "%c:%p:%z:%a" |sort-k5-nrAnalysis:-E Display Process-O display by user-defined format%c CPU%p Parent Process ID%z Virtual Memory%aSort Order Command-k5 sorted by 5th column-nr comparing numbers
1. In the command Line Definition Editor commandcommand format sed options script fileSED does not modify the text file's data, he only sends the modified data to stdout.2. Use multiple editor commands on the command linePlace the command in a
Previously wrote an article, with Shell timed purge expired files "Shell timed purge expired files", its practical is simple find commandAfter the colleague adopted, he debug the script, there are a few errors, I did the collation:1.find:paths must
Recently found that the date command is especially useful (not in Mac)1. Get today's date[Email protected] ~]# date +%y%m%d201411232. Get the date of a day" 2014-11-12 " +%y%m%D20141112This seems like crap, but it's okay, keep looking.3. Get a day
Prevent other people from brute force password and deny this IP access to SSH service if someone tries to enter a password error number 5 times.#!/bin/bashlastb | awk ' {print $3} ' | uniq -c | sort -r > a.txtsed -ri ' [email protected]^[[:space:
Today in three different ways to achieve the shell script Print 99 multiplication table, the code is as follows Method 1: Use a For loop (a.sh) #!/bin/shfor i in {1,2,3,4,5,6,7,8,9}do to J in {1,2,3,4,5,6,7,8,9} do ((product= $i * $j)) Echo-ne $i \ *
1.Shell itself is a program written in C language, it is a bridge for users to use Unix/linux, most of the user's work is done through the shell. the shell is both a command language and a programming language. as a command language, it interprets
I. Introduction of CrondCrond is a daemon that is used to periodically perform certain tasks or wait for certain events under Linux, similar to Scheduled tasks under Windows, when the operating system is installed, the Service tool is installed by
1. String Qiatouquwei #,%For example:X=aabbaarealwwvvwwecho "${x%w*w}"Aabbaarealwwvvecho "${x%%w*w}"Aabbaarealecho "${x# #a *a}"Lwwvvwwecho "${x#a*a}"BbaarealwwvvwwWhere, # means pinch the head, because on the keyboard # on the left.Where,% is said
When analyzing the process of inserting sorting algorithm performance, it is known that when the array is small or there are more ordered subsequence, the insertion sort will finish sorting the array in a very short time, so you can design a
What is a shell?LS there a bunch of directories? What is the implementation process? LS is an application, the shell translates it into 01 code to the kernel, the kernel to the hardware, and then back!The shell is also a powerful programming
Summary of the use of shell scripts and the use of shell scripts
(1) The csh script can call the bash script, and vice versa.
(2). How to call variables and functions defined in other scripts.
(3). Defined variables. The default value is global
Shell-find error Parsing
I have written an article about how to use shell to regularly clear expired files. In fact, the simple find command is used.
After my colleague adopted the script, he encountered several errors when debugging the script. I
Linux uses shell scripts for the key Nohup and shellnohup tasks
There are many articles on the Internet to teach you how to use scheduled tasks, so I will not talk much about other nonsense.
I have SH for timing, but you don't know it. You must use
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