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
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
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
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
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:
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
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
[-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 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
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 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
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-
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
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
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
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
*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
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
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
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.