Basic Bash Shell command--1

1.manAccess the manual pages stored on your Linux system. You can use the Man command to view a command.Eg:man ls man Mans2.cdSwitch directories. The path to the directory has an absolute path and a relative path.EG:CD. Switch to upper-level

Use of expr in the Shell

The 1.expr command is generally used for integer values in the general format:Expr argument operator argumentThe general usage is to do arithmetic operations using expr, such as:[[email protected] ~]# Expr 10 + 2030$expr 30/3/25(Note that operators

Memory monitoring and alarm shell scripts

# free-m |awk ' nr==3 {print $NF} '4012#!/bin/bash Scriptused_mem= ' free-m |awk ' nr==3 {print$nf} 'If [$used _mem-lt 5000]Thenecho "Mem is not enough, $used _mem."echo "Mem is not enough, $used _mem." | Mail-s "MEM Warning $ (data +%f)" [email

Shell variable operation

1. Define variables: In order to avoid conflicts with environment variables, generally lowercase: such as pp= "mydql,kdkfeof";Second assignment scheme:The calling variable uses the $ symbol:Variable overlay:2. The output uses ECHO, as shown in:3.

HDU 5730 Shell Necklace (CDQ Division +fft)

mul

"Topic link" http://acm.hdu.edu.cn/showproblem.php?pid=5730"The main topic"Give An array w, representing the weights of the fields of different lengths, such as W[3]=5, if the field length is 3, then its weight is 5, and now there is a field of

Shell file processing Tools

vim/etc/resolve.conf View DNS6.shell script Commands1.diffDiff file File compares the differences of two files-C Displays the surrounding rows-U generates patches in a uniform output format-R comparison of files in two directoriesPattch file

HBase Shell Basic Command Summary

Accessing HBase, and manipulating hbase, commands do not use semicolonsHBase Shell enters HBaseList View TableHBase shell-dHBase (main):024:0> scan '. META. '============= Small Example ===================================================1. Create a

Linux Learning Diary-shell scripts and Scheduled Tasks

This article will aim to implement regular automatic backups of the MySQL database, and introduce the perfect collaborative process between shell scripts and scheduled tasks. Where the shell script is responsible for the specific backup operation,

If the shell determines that a variable is empty

1. The most straightforward and straightforward judgmentWithout those if statements, directly shorten the amount of code.2. The variable is caused by "" quotation marksAs shown below:, you can get the result is NULL.#!/bin/sh a= if [!-n "$a"];

First shell script

Open a text editor, create a new file, the extension sh (sh for Shell), the extension does not affect the execution of the script, see the name is good, if you write a shell script in PHP, the extension is good with PHP.Enter some code:

Shell command _ File system common commands df, du

One, DF (File System view command) [[email protected] ~]# DF [option] [Mount point] option:- A displays all file system information, including special file systems such as/proc,/sysfs-H , using the customary unit display capacity, such as KB, MB or

Shell command _for

chmod 755 demo.sh./demo.sh 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 6667686970 #!/bin/bash# Author:James 2016-10-15# 集合以空格分割fori in 1 2 3 4 5 6    do   

Linux+shell acquiring and copying the latest data to remote devices

Linux+shell acquiring and copying the latest data to remote devicesOur remote general copy of the data are created by the shared secret key, so that the copy of the words do not have to enter a password, specifically, I can refer to the previous

Shell Summary (0 basic primer)

First, IntroductionThe shell is the command-line interpreter that the user interacts with the operating system.There are many kinds of shells:bash, csh, sh, ksh 、、、The command line we saw when we waited for Linux was a bash.Two, the first

Shell Programming-cont.

Shell scripts can be seen as a stack of commands, implemented by combining command flow control mechanisms.The interpreter #!/bin/bash or/usr/bin/python is also known as ShebangThe generic script needs to give execution permission, or you can use

Linux Shell Common directives

1. Man helps explain commands you are familiar with or unfamiliar with Eg:man ls to view LS-related usage Note: Press the Q key or CTRL + C to exit, under Linux you can use CTRL + C to terminate the current program run. 2. LS to view the

Shell Batch Decompression method

First:For tar in *.tar.gz; Do tar xvf $tar; DoneFor tar in *.tar.bz2; Do tar xvf $tar; DoneSecond: Bulk unzip all tar.gz files in a folder with the tar commandLS *.tar.gz | Xargs-n1 Tar XZVFThird: find-maxdepth 1-name "*.gz" |xargs-i tar xvzf {}This

Linux Shell (SSH bulk configuration secret) read the configuration file for remote operation

Requires the target machine to have the expect command installedDivided into five files config.ini (config file), id_ras.pub (public key), read.sh (a function for reading the configuration file), test.sh (execution file), run.sh (remote run script)

Conditional control in shell scripts and the use of loops

Reprint please indicate: http://www.cnblogs.com/winifred-tang94/If conditional statement syntax:If [conditional expression]ThenCodeElseCodeFiNote : In the IF condition statement above, there should be a space between if and [, and the conditional

Using Jenkins to remotely execute Linux shell commands on Windows

The company recently built Jenkins on Windows, but the release was published to a Linux server, so there will be a problem with executing the shell command on the automatic deployment, and then looked for it;Discover that Jenkins has a plugin for

Total Pages: 541 1 .... 373 374 375 376 377 .... 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.