Second, Shell file permissions and script execution

I. Understanding rights and User management1. View PermissionsPermission Type:1, R read 2, W write 3, x executableLinux Users1. Owner (U) 2, owning Group (g) (All users of owner and owner Group) 3, other User (O) (all users of other groups

Use of shell scripts---cut intercept data

Usage of the Linux Cut commandFont: [Increase decrease] Type: Reprint time: 2013-10-03 I want to commentCut is a selection command that analyzes a piece of data and takes out what we want. In general, the selection of information is usually for

Shell gets all file names, paths, file sizes under directory (including subdirectories)

A sample shell script:Gets all file names, paths, and file sizes under the directory (including subdirectories).Code, Shell script: lsdir.sh#!/bin/bash# #site: www.jquerycn.cnfunction ergodic () { forFileinch' LS $1` Do if[-D $1"/"$file] then

Part 2: Enable the Shell to read commands

This article is part of the article "writing a Shell" series. In the previous article, we have completed the first step of our shell: the shell prompt. In this article, we begin to enable our Shell to start reading commands, and to do simple

Linux Shell ${} simple usage

Suppose we define a variable as:File=/dir1/dir2/dir3/my.file.txtWe can replace each other with ${} to get different values:${file#*/}: Take out the first/its left string: dir1/dir2/dir3/my.file.txt${file##*/}: Take out the last/and left string:

Connectors in the shell (and, and, or)

When using "&&", only Command1 execution succeeds, Command2 will execute, otherwise command2 not execute; [[email protected] ~]# ls 1.txt && ls 2. Txt1.txt2.txt[[email protected] ~]# ls 1.txt && ls 20.txt1.txtls: Inaccessible 20.txt: No file or

Shell Programming Basics-Grammar Quick Start

Simply put, the shell is a file containing several lines of shell or Linux commands. For a large number of commands that are written and used more than once, you can use a separate file to save it for later use. Usually the shell script is suffixed

The shell condition in Linux determines if-A to-Z

[-A file] is true if file exists.[-B file] True if file exists and is a block special file.[-C file] True if file exists and is a word special.[-D file] True if file exists and is a directory.[-E File] True if file exists.[-F file] True if file

Usage of Shell expr

Usage of Shell exprMathematical operationsLet command expr command BC command $ (()) $[]Http://www.80ops.cn/archives/245.htmlThe expr command is generally used for integer values, but can also be used for strings.The general format is: expr argument

Shell Script Programming Overview (IV): Bash built-in character processing tool

First, string slices:${var:offset:number} takes a substring of a string;Take the rightmost few characters of the character toe: ${var:-length}Note: There must be a white space character after the colon;Second, To take a substring based on a pattern:1

Shell programming in Linux

Shell programming1 echo-e recognition \ escape character \a \b \ n \ \x hex \ 08 Binary, etc.#!/bin/bashEcho-e "Hello World"Execute script: Mode 1:chmod 755 hello.sh./hello.shWay 2:bash./hello.sh (this way does not need to give execute permission)1

Shell determines whether a file exists

Transferred from: http://www.cnblogs.com/sunyubo/archive/2011/10/17/2282047.html1. Shell to determine the file, whether the directory exists or has permissions2. #!/bin/sh3.4. Mypath= "/var/log/httpd/"5. myfile= "/var/log/httpd/access.log"6.7. # the-

Type of shell if judgment

if [$#! = 1]; Thenecho "USAGE: $ tabname"echo "e.g.: $ cdr_call_20040701"Exit 1;FiLocation parameters $ #代表了命令行的参数数量, $ $,..., $N, and $ A represents the name of the script-ne Not equal to-----------------------Used in shell programming to determine

Linux shell command CP Plus-F or prompt to overwrite

This is due to the fact that the environment variable hasAllias cp= ' Cp-i 'In order to get rid of the alias of this system, can use Grep-r--include= "*" "Alias CP"/Find the script file setting this environment variable:On my Ubuntu machine

HBase Common shell commands

Transferred from: http://www.cnblogs.com/nexiyi/p/hbase_shell.htmlTwo months ago used HBase, now the most basic commands are forgotten, leave a reference ~ Enter HBase Shell Console$HBASE _home/bin/hbase ShellIf you have Kerberos

Shell Script Programming Notes

1. The first line must specify the shell used: #!/bin/bash/2, Print command: Echo-N: Suppress line breaks3. Use command line parameters:$#: The number of command-line arguments passed in the script$*: All command-line parameter values, with a space

Deletion, substitution and substitution of shell variable contents

Deletion of shell variables:[Email protected]:~$ Path=${path} # #设置path和PATH相同内容 [email protected]:~$ echo $path/usr/local/sbin:/usr/local/bin:/ Usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games[email protected]:~$ echo ${path#/*sbin:} # #加上 '

Java call Shell process has not exited

*http://kingj.iteye.com/blog/1420586, there wasJava.lang.IllegalThreadStateException:process have not exitedAt Java.lang.Win32Process.exitValue (Native Method)Exception, background 100 degree discovery, the JDK implementation process, call External

Manual de-FSG shell combat

Fly2015For FSG shells. No previous contact was the first contact. This time to take the shelling process is still my love to crack the forum to crack the training of the Operation 3 program. For this shell toss for a while, and later was taken care

Small black daily tossing-quick creation of shell scripts for private CA

Small black daily tossing-quick creation of shell scripts for private CA Tom started to make new things again. He just learned how to build a private CA through openssl last week and spent some time writing this script on Saturday. After that, he

Total Pages: 541 1 .... 133 134 135 136 137 .... 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.