Basic operation of the service/etc/init.d/sendmail Start # Launch service/etc/init.d/sendmail Stop # Close Service/etc/init.d/sendmail Status # View the current status of the service/date/mysql/bin/mysqld_safe--user=mysql # start MySQL background
Function: Automatically detect if there are not partitioned data disks, format new data disks and mount
Solved what problem: one-click to detect whether there are not partitioned data disks, and can be formatted and automatically mounted,
Recently, just need to test the stability of the new station, so write a shell script to the local (recently changed MAC), to real-time view you need to monitor the status of the Web page, and sent to the designated mailbox.Here's a compliment. OS X
Script content:
The code is as follows
Copy Code
#!/bin/bash# Author:mos# Script Name:mos_ca.sh# Date & time:2013-01-06/23:05:35# version:1.0.2# Description:#[-f/etc/sysconfig/mos_ca.conf] &&.
Du command
Disk Management
The du command also looks at the usage space, but unlike the DF command, the Linux du command is a view of the space used by files and directory disks, or there are some differences from the DF command.
Grammar
du
Introduction to Linux file commands:
This command is used to identify file types and to identify the encoding format of some files. It gets the file type by looking at the header information of the file, not as if Windows determines the file type
A start to build the Chinese blog Alliance, both bloggers remind me to do Web site Daquan maintenance of this kind of website is very troublesome, need a lot of energy to debug some of the aborted site, but also to take the blog Encyclopedia of Pine
1. Character truncation:If the character truncation is a generic path, you can use both the basename and dirname tools:BaseName can truncate a filename from a file path
For example:
Copy Code code as follows:
$
Several cases of sqlplus and shell passing value to each otherScenario One: The simplest invocation of sqlplus in the shell$cat test.sh#!/bin/shSqlplus Oracle/[email Protected]>file.log SELECT * from Test;ExitEOF #注意EOF要顶格写$sh test.sh$cat
Use shell scripts to implement a one-click installation of the LANMP system. The operating system used is CentOS 6, which does not differentiate between 32-bit and 64-bit, requiring the machine to connect to the Internet. Supports both LAMP and LNMP,
Create a shell scriptWhen you create a shell script file, you must specify the shell to use in the first line of the file, in the format:#!/bin/bashCreate and execute SH scriptCode 1-1[Email protected]:/data# cat demo1 #/bin/bashdatewho[email
Command-line argumentsThe most basic way to pass data to a shell script is to use command-line arguments, which allow you to add data values to the command line when you run the scriptReading parametersBash Shell assigns some special variables
In the previous blog post, we have learned how to coordinate how each level in the whole system works, and the command issued by the application layer reaches the drive layer under the kernel, thus achieving the purpose of operating the hardware
Description: +n is greater than N,-n is less than n, n is equal to N.Find/-amin-30-ls # finds files accessed in the last 30 minutes of the systemFind/-atime-2-ls # finds files accessed in the last 48 hours of the systemFind/-mmin-10-ls # finds files
The shell itself is a program written in C, which is a bridge for users to use Linux. The shell is both a command language and a programming language. As a command language, it interprets and executes user-entered commands interactively, and as a
There are four kinds of arithmetic operations in Linux, namely expr,let,$[],$ (()).Here are the four ways to use the arithmetic operations, respectivelyFirst, the use of expr[[email protected] ~]# Expr 1 + 23[[email protected] ~]# expr 1-2-1[[email
Guide
When you're going to really manipulate your Linux system, there's nothing like a command-line interface that lets you do that. To be a Linux master, you must be able to understand the different types of shell commands and use them
Until cycleThe environment used to perform loops when a proposition is falseWhen a proposition is false, it enters the loop; exit the loop when the proposition is trueOr if the condition is not satisfied, enter the cycle of the sceneIn logical
In the bash shell, there are 2 main classes of Process Control commands: " condition ", " loop ". "Conditions" are: If, case, the "loop" has: for, while, until; command select is both "condition" and "loop". Either way, the condition test is
# # # Bash in the History command in the Shell----------In daily operations, we often use the history command to check the historical commands executed on this machine, or at what time the commands are executed. The history command does not show 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service