Some operators of files, file Operators

Source: Internet
Author: User

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)

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.