Today received the relevant departments reflect that the storage space is not enough. You need to delete some video files to make room. As soon as I took the job, I wrote a python script. Helpless, personal Python level is also an introduction. So
Tag:shell reference escape command replace Escape and reference two types of characters: normal character and escape character escaping: "\" Example: 1, Echo $Dollar 2, echo \ $Dollar 3, Ech O? Characters that need to be
From the programmer's point of view, the shell itself is a program written in C language, from the user's point of view, the shell is the user and the Linux operating system communication Bridge. The user can either enter command execution or use
2. UseThe grep command in a Linux system is a powerful text search tool that uses regular expressions to search for text and print matching lines. The grep full name is global Regular expression Print, which represents the globally regular
Sometimes to share a tool with others, but also need to provide more documents;If sharing a compressed package also have to teach each other how to extract, execute which script, feel the need to transfer more content is inconvenient;A few shell
The Shell profile:When a new interactive shell is started,/etc/profile, followed BY/ETC/BASH.BASHRC (if aBash shell), ~/.profile, and finally ~/.BASHRC is executed in that order.PATHcan set your pathenvironment variable to tell the shell where to
In the case of Red Hat Enterprise Linux versions, the contents of Rhel are as follows,/bin to store commands used by ordinary users/sbin storing commands that administrators can executeHome directory for ordinary users such as Zhangshan home
Shell Practice 11.requireA B C D1 2 3 45 6 7 83 5 8 01 2 4 3After handling:T A B C DA 1 2 3 4B 5 6 7 8C 3 5 8 0D 1 2 4 31.first need read the first line as an array.Then append the element in the proper position for file;oldifs= $IFSIFS =$ ' \ n ';
First, the Logical volume label
Logical Volume Label
Express meaning
1.
About the file and directory of the detection of Logical volume label!
-F
Common! Detect if "Archive" exists eg:if [-f
Xcode statistics code, with the shell command can be very simple. Open the terminal, enter your project directory, execute the following codefind . -name "*.m" -or -name "*.h" -or -name "*.html" -or -name "*.c" |xargs wc -lIf you want to count iOS
The format of writing shell scripts with vim or VI is fixed, as follows: #!/bin/sh#commentscode #! tells the system that the program specified after the path is the shell that interprets this script file. If there is no such sentence in the first
Fundamentals of the ten-year OPS series-LinuxZeng LinContact: [Email protected]Website: www.jplatformx.comCopyright: Please do not reprint the article without permission
First, IntroductionWe have not had the ability to receive and process
Requirements DescriptionIn bash, we can easily split the text using the split command. Now add two points of demand:1. Insert title at the head of each split file for easy viewing.2. The name of the split file is numbered before the source file name,
In the process of learning the algorithm, we will inevitably touch many and sort-related algorithms. All in all, the basic sorting algorithm must be mastered for any programmer.Starting today, we're going to be explaining the basic sorting algorithm.
Under the shell, what do we need to do to write a shell script and then run it;Win, you can write a AutoHotkey script, and then bind the shortcut keys, one click to run.Many tutorials on the web, such
Shell programming tmpwatch
As a system administrator, you often need to regularly clear files with certain rules, such as expired logs, expired archives, and backed up files.
If you use certain matching rules to find these files and pass them to the
Some common Shell commands
Common system commands]
Passwd [hostname]Change Password
Useradd [hostname]Add User
Su-Switch to the root user
Ssh [hostname]Ssh connection
Cd [directory]Go to the directory
Sudo chown [username]Grant corresponding
Execute the system command and write the shell script that writes the output to the specified log file (2)
The previous article was a simple script that can be executed and written into logs. However, if it is placed in the production environment,
Linux shell Command and execution script, linuxshell
Http://blog.csdn.net/pipisorry/article/details/44681081
Cut all subfolders in the current folder to the current folder
For dir in $ (ls)Do# Echo $ dirIf [-d $ dir-a "$ (ls-A $ dir)"]; thenMv./$
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