1. string Judgments
STR1 = str2
True when two strings have the same content, length
Str1! = str2
True when strings str1 and str2 are unequal
-N str1
True when the length of a string is
1) Judgment expressionIfTest (expression is true)IfTest! expression is FalseTest expression 1–a expression 22 expressions are trueTest expression 1–o Expression 22 expressions have a true2) Judging the stringTest–n string string is not zero in
4. Input and output#! /bin/bash# Read users input and then get his nameread"Please input your first name: " firstNameread"Please input your last name: " lastNameecho-e"Your full name is: $firstName $lastName"Read how to use:read[-ers][-a 数组][-d
5th Linux Utility 5.2 Basic Utility ls: Lists all file or folder names under the current folderCat: Display the contents of the target text fileRM: Delete destination fileLess or more: split-screen display of text files (when the file content is
Before there was a need to empty open files and then re-write the requirements, but using ftruncate (FD, 0), and did not achieve the effect, but the file head has ' "", the length is larger than expected. The reason is that I did not use Lseek to
Rising anti-virus software network version of the network can be a unified computer installation, Setup, management, maintenance and upgrade, so as to provide a sound network of virus prevention system. For the first contact anti-virus software
Linux Process Permissions Analysis
In Linux, about file permissions, most people contact more, but also more familiar with the understanding. But there is little knowledge of process permissions. This article summarizes the Linux system under the
See: http://blog.csdn.net/m13666368773/article/details/7615125Linux setuid mechanism(1) Which resources or files can be accessed while the process is running, and not depending on the owner of the process file, but rather on the uid/gid of the user
Shell Script Series Tutorial Two: Start Shell programming2.1 How do I write a shell script?(1) The most common use of VI or mcedit to write shell scripts, but you can also use any of your favorite editor;(2) After the script is written, to set
Linux provides the setuid function and the Seteuid function to change the user ID associated with the process, and the process-related user ID has an "actual user ID, a valid user ID, and a saved settings user ID"=====================================
when a child process is created using fork (), the Exec family function is typically used to specify a new program to overwrite the child process's code snippet, data segment, heap, and stack. This allows the child process to execute a new program
1 Representation of file permissions(1) Letter notationAll files in Linux (normal files, directory files, character special files, block special files, pipelines or FIFO, symbolic links, sockets) have 9 permissions, as shown in:-rw-rw-r--is the
Excerpted from http://blog.csdn.net/saga1979/article/details/14161229Man ld.so (8) said that if the library dependency does not include "/", then it will search sequentially according to the following rules:
(elf format only) if the
Objective:no matter what programming language is inseparable from conditional judgment. The shell is no exception.
Copy Code code as follows:
If List Then
Do something here
Elif List Then
Do another thing
Else
Do something
The content of this chapter is more, this paper only records the problems found in the learning process, while recording the required knowledge of Linux. File Type
Normal fileCatalog filesBlock Special FileCharacter Special FileFifoSocketsSymbolic
1.7.4 Modify security Settings
If you have already created a file or directory, and you need to modify its security settings. 1. Modify Permissions
The chmod command allows you to modify the security settings for files and directories. The format
Original: http://www.techcuriosity.com/resources/linux/advanced_file_permissions_in_linux.php
Here we'll discuss about the 3 special attributes other than the common Read/write/execute.Example:Drwxrwxrwt-sticky Bits-chmod 1777Drwsrwxrwx-suid
Test Condition Expression Description
File symbols:
[Root@lamp test]# Help testtest:test [expr]Evaluate conditional expression.Exits with a status of 0 (True) or 1 (false) depending onThe evaluation of EXPR. Expressions May is unary or binary.
Shell if judge commonly used in the green part, the tail part of the more do not understand. Reproduced from Baidu Library.
[-A file] if FILE existence is true.
[-B-file] True if file exists and is a block-specific file.
[-C file] is true if file
Conditional expression ("CONDITIONAL EXPRESSIONS")
Conditional expressions are used in [composite commands and built-in command test and [to test file properties for string and arithmetic comparisons.] An expression is constructed using 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.