Some operators of files, file Operators
When executing files, pay special attention to the judgment.
-R |
The file can be read by a valid UID/GID. |
-W |
The file can be written by a valid UID/GID. |
-X |
The file can be executed by a valid UID/GID. |
-O |
The file is owned by the valid UID |
-R |
The file can be read by the real UID/GID. |
-W |
Files can be written by real UID/GID. |
-X |
Files can be executed by real UID/GID. |
-O |
Files are owned by real UID |
-E |
File exists |
-Z |
The file size is zero. |
-S |
File size is not zero (return size) |
-F |
A file is a simple file. |
-D |
The file is a directory |
-L |
File is symbolic connection |
-P |
The file is named pipe (FIFO ). |
-S |
The file is a socket |
-B |
A file is a special block file. |
-C |
A file is a special character file. |
-T |
The file handle is opened as a tty. |
-U |
Set the setuid bit in the file. |
-G |
The setgid bit is set in the file. |
-K |
The sticky bit is set in the file. |
-T |
A file is a text file. |
-B |
The file is a binary file (corresponding to-T) |
-M |
The age of files that have been modified in days (from the beginning) |
- |
The files that have been accessed since the last time are recorded in days (from the beginning) |
-C |
The age of files modified since inode (from the beginning) |