Shell script automatically frees up space script in Linux

System: CentOS 5.xScript content: The code is as follows Copy Code Cat make_room.sh#!/bin/bash#size = ' Df-hp|grep/dev/mapper/volgroup00-logvol00|awk ' {print $} ' |cut-f 1-d ' G 'Size= ' Df-mp|grep/dev/mapper/volgroup00-

Shell date to timestamp in Linux

The way to get timestamps in the shell is: date-d "$currentTime" +%s If you want to convert a date to a timestamp, you would do the following: 1. Get the current time Currenttime= ' Date ' +%y-%m-%d%h:%m:%s ' 2. Convert date to time stamp

Infiltration using OPENROWSET to engage in Shell methods _ security-related

Infiltration using OPENROWSET to engage the shell Get the SQL injection point, the first thought is backup Webshell, throw in NB run a lap, found that blocked the SQL error messages, not the physical path, that also wrote a PP horse. Associated with

Linux shell script programming regular expression _linux shell

A regular expression and wildcard characters 1 A regular expression is a string that matches the criteria in a file, and a positive one contains a match, and grep,awk,sed commands can support regular expressions The 2 wildcard is used to match the

Linux shell implementation to determine if the number entered is a reasonable floating-point _linux shell

This shell is to determine if the number entered is a reasonable float The implementation code is as follows: #!/bin/sh # Validfloat-Tests Whether a number is a valid floating-point value. # This script cannot accept scientific (1.304E5)

Accumulate Linux common commands Daquan _linux shell

I have a limited memory, the usual Linux encountered in the project to share the common commands to everyone. Linux Common commands complete http://www.jb51.net/linux/ ^m exists in Linux filesThe use of shell command TR can be achieved by removing

A simple way to get file names and directory names using the bash shell _linux Shell

Objectiveor do you write an automated packaging script today that takes you to get the last file name from the path name. Here is a record of the implementation process. Of course, in the end I will also give the official practice. (PS: Very awkward,

Tips for Shell grep lookup process _linux Shell

Most people use grep to find the specified process in the PS aux output when they write the shell filtering process, but they also display the grep process, such as finding the pptpd process, which matches two: Copy Code code as follows:

Sharing several tips in shell programming _linux shell

1. Print some header informationCommand ............Dilimiter The standard input of the command as the content of the boundary symbol DilimiterCommonly used in the echo command, this avoids the need to use an echo command without outputting a line,

Detailed Linux operating system installation of the RPM package steps _linux Shell

The 2nd generation Linux operating system in the installation of software is quite simple: the first step, search for the software you want, such as you want to find a game software, its name is called Myward, the Game Software description is: Myown

Two scripts to check Linux network status _linux Shell

First, through the timing of email to detect network connectivity Copy Code code as follows: #/bin/bash echo "Daily Test mail" > State.txt Mail-s Server_state Abc@jb51.net Rm-df./state.txt ~ Crontab-e Add the following

When Linux executes the. sh file, prompts no such what to do with file or directory (three solutions) _linux Shell

First of all, let's look at the problem description, the following figure is my run-time error screenshot: Solving method Analyze the reason, maybe because I have a problem with my platform migration, we have permission to convert. 1 conversion

Shell script reads text file line by row (without changing text format) _linux Shell

There are many examples of shell script-reading text files on the web, but they don't tell the whole story, only half of it. For example, read a text line from a testfile file in the following format: Copy Code code as follows: $ VI

Bash Shell programming Exercises

Original file:Find/etc-name passwd 2>&1 | Tee Ee.log1. Cat-n The document contents of the E.log with the line number and enter E2.log in this document:[Email protected] ~/t2scripts $ cat-n E.log |Tee E2.log1/etc/passwd2 3 4Find:

JMeter Bean Shell Use (ii)

Previous JMeter Bean shell Use (a) a brief introduction of the bean shell in the next jmeter, this article is a supplement to the above, mainly summarizes the common scenarios and methods, I believe these basic can cover most of the needs. This

9th Shell Basics (1) _shell Introduction and script execution methods

1. Shell Overview1.1 Shell Introduction(1) The shell is a command-line interpreter that provides users with an interface system-level program that sends a request to the Linux kernel to run the program, allowing the user to start, suspend, stop, or

Linux Shell Basics (vi)

bz2

12. Sort commands for Rowssort:1. Sort command-line options: Options Describe -T Separators between fields -F Ignore case when sorting based on character -K Define

Linux Shell Basics (ii)

Seven. grep family: 1. grep exit Status: 0: Indicates success; 1: Indicates that a matching pattern could not be found in the supplied file; 2: Indicates that the file provided in the parameter does not exist. See the example below: /> grep '

Nginx log analysis shell script

A few commandsThe script is based on the preceding log format. If your log format is different, you need to adjust the parameters following the awk.Analyze the UserAgent in the log The code is as follows:Copy code Cat access_20130704.log | awk-F

Total Pages: 541 1 .... 249 250 251 252 253 .... 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.