Umask Set permission mask
General default mask is 022
Directory highest permissions 777
File maximum permissions 666
Based on mask, permissions are
777-022 = 755
666-022 = 644
-
String test /p>
test
1) detects if the variable is null
[-Z $var]
If you are empty, perform the following
[z $var] && touch filename
-
Program exit status
Example: Test string
& nbsp [-Z ']
echo $? # 0
[-Z "AAA"]
echo $? # 1
0 is normal, 1 is abnormal
-
Test Status
File:
-D directory
x executable
-w writable
-S file length is not empty
-R readable
-l sign Connection
-F Regular file
1) test whether the file can be executed
[-x filename]
Echo $?< BR>2) test is a regular file, if it is a directory, does not pass
[-F tttt];echo $?
-
This article is from the "Nickylans" blog, make sure to keep this source http://378359.blog.51cto.com/368359/1908872
Shell Learning Essays