The shell determines the file type.
-D file to determine whether the file exists, and whether it is a directory (the directory is true)-e file to determine whether the file exists (exists as true)-F file to determine whether the file exists , and whether it is a file ( Is the normal file is true)
-R
If a file exists, determine if the file has Read permission to have Read permission to return True
-W
If a file exists, determine if the file has write permission to have write permission to return True
-X
If a file exists, determine whether the file has Execute permission to return True
in the shell, the general wording is eg: [Space--e/tmp/index . Echo "Yes" | | Echo "No"
Next look at the picture
/tmp/test/cut1.txt the file exists in this directory
/tmp/index.php This file does not exist
Look at the picture
1.txt file only read and execute permission to see the results of the graph. (can not distinguish between the user, 3 of the only one of them is true)
Shell determines file type and permissions