Shell script to delete the specified directory file based on field state

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

Shell Learning Note III (escaping and referencing)

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

Learn about the--shell script for Linux with brother Bird

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

"Shell" grep command

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

〖linux〗 simply package the shell and some files into a separate "executable file"

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

Linux Shell get random number

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

Linux Shell Learning Note a directory structure

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

Linux Bash Shell One practice:array if else

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 ';

Linux Shell logical operators

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

A shell statistic code line number

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

Shell Scripting Learning

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

(031) The shell location parameters of Linux

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

Using shell scripts for text splitting

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,

Shell script programming (merge sort)

#!/bin/bash#shell Sorting of Scripts a= (1 3 5 7 9) b= (2 4 6 8) C=n=5m=7i=0j=0k=0while [$i-lt $n-a $j-lt $m];d OIF test ${a [$i]} -GT ${b[$j]};thenc[$k]=${b[$j]}j=$ (($j + 1)) k=$ (($k + 1)) elsec[$k]=${a[$i]}i=$ (($i + 1)) k=$ (($k + 1))

The shell sort of Java common sorting algorithm

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.

Recently discovered an artifact AutoHotkey, which can be likened to a shell script under the Windows graphical interface

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

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

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)

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

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./$

Total Pages: 541 1 .... 440 441 442 443 444 .... 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.