`
wanbin021614
  • 浏览: 27666 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

File Test Operators

阅读更多

A file test operator is a unary operator that tests a filename or a filehandle.

Operator Meaning
-r File is readable by effective uid/gid.
-w File is writable by effective uid/gid.
-x File is executable by effective uid/gid.
-o File is owned by effective uid.
-R File is readable by real uid/gid.
-W File is writable by real uid/gid.
-X File is executable by real uid/gid.
-O File is owned by real uid.
-e File exists.
-z File has zero size.
-s File has non-zero size (returns size).
-f File is a plain file.
-d File is a directory.
-l File is a symbolic link.
-p File is a named pipe (FIFO).
-S File is a socket.
-b File is a block special file.
-c File is a character special file.
-t Filehandle is opened to a tty.
-u File has setuid bit set.
-g File has setgid bit set.
-k File has sticky bit set.
-T File is a text file.
-B File is a binary file (opposite of -T).
-M Age of file (at startup) in days since modification.
-A Age of file (at startup) in days since last access.
-C Age of file (at startup) in days since inode change.
分享到:
评论

相关推荐

    perl-pocket-ref-5.004.1.pdf

    File Test Operators Perl支持一系列文件测试操作符,用于检测文件属性。 - **-e**:文件是否存在。 - **-r`、`-w`、`-x**:读写执行权限。 ### 18. File Operations Perl内置了用于文件操作的函数。 - **open...

    shell cheat sheet

    #### Test Operators - **Numeric Tests**: Perform comparisons between numeric values using operators like `-lt` (less than), `-gt` (greater than), `-eq` (equal to), `-ne` (not equal), `-ge` (greater or...

    pattern matcher

    This is a pattern matcher in common lips. We implement the function match with two parameters: a pattern and a fact. It returns a list of variable-value ... In the test.txt file we can see more examples.

    Linux高级bash编程

    Batch file keywords / variables / operators, and their shell equivalents L-2. DOS commands and their UNIX equivalents N-1. Revision History 例子清单: 2-1. 清除:清除/var/log下的log文件 2-2. 清除:一...

    SCJP6 Sun Certificated Programmer for Java 6 Study Guide (Exam 310-065) 英文原版

    - **File Handling**: Creating, deleting, renaming, and checking file existence. - **Formatting and Parsing**: Formatting numbers and dates, parsing strings to specific formats. #### 7. Generics and ...

    Advanced Bash-Scripting Guide <>

    Batch file keywords / variables / operators, and their shell equivalents L-2. DOS commands and their UNIX equivalents N-1. Revision History 例子清单: 2-1. 清除:清除/var/log 下的log 文件 2-2. 清除:一...

    ARM® Compiler v5.06 for µVision® armasm User Guide

    4.22 Test-and-branch macro example 4.23 Unsigned integer division macro example 4.24 Instruction and directive relocations 4.25 Frame directives 4.26 Exception tables and Unwind tables 4.27 Assembly ...

    人工智能-机器学习-智能酒店信息化系统的设计与实现.pdf

    The system implementation chapter discusses the file structure and code aspects of the implementation plan, ultimately realizing the system and showcasing it from a user interface perspective....

    JavaScript Applications with Node.js, React, React Native and MongoDB

    JavaScript Applications with Node.js, React, React Native and MongoDB: Design, code, test, deploy and manage in Amazon AWS By 作者: Eric Bush ISBN-10 书号: 0997196661 ISBN-13 书号: 9780997196665 出版...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    For example, if your header file uses the File class in ways that do not require access to the declaration of the File class, your header file can just forward declare class File; instead of having ...

    Turbo C++ 3.0[DISK]

    This README file contains important information about Turbo C++. For the latest information about Turbo C++ and its accompanying programs and manuals, read this file in its entirety. TABLE OF ...

    Turbo C++ 3.00[DISK]

    This README file contains important information about Turbo C++. For the latest information about Turbo C++ and its accompanying programs and manuals, read this file in its entirety. TABLE OF ...

    python3.6.5参考手册 chm

    Operators And Special Methods Builtins Build and C API Changes Performance Porting To Python 3.0 What’s New in Python 2.7 The Future for Python 2.x Changes to the Handling of Deprecation ...

    R for beginner

    This interactive nature makes it easy to test out small pieces of code and see immediate results. Here’s a brief overview of how R works: - **Interactive Mode**: In this mode, you can type commands...

    The Art of Assembly Language Programming

    RCR 6.6.3.3 - ROL 6.6.3.4 - ROR 6.6.4 - The Bit Operations 6.6.4.1 - TEST 6.6.4.2 - The Bit Test Instructions: BT, BTS, BTR, and BTC 6.6.4.3 - Bit Scanning: BSF and BSR 6.6.5 - ...

    C++常用英语单词.docx

    10. **算术运算符(arithmetic operators)**: 如+、-、*、/、%等,用于执行基本数学操作。 11. **汇编程序(assembler)**: 将汇编语言代码转换为机器语言的程序。 12. **汇编语言(assembler language)**: 一种低级...

    一本基于matlab的数理统计电子书-Crc Press - Computational Statistics Handbook With Matlab -.part4.rar

    A.3 File and Workspace Management A.4 Punctuation in MATLAB A.5 Arithmetic Operators A.6 Data Constructs in MATLAB Basic Data Constructs Building Arrays Cell Arrays A.7 Script Files and ...

    一本基于matlab的数理统计电子书-Crc Press - Computational Statistics Handbook With Matlab -.part1.rar

    A.3 File and Workspace Management A.4 Punctuation in MATLAB A.5 Arithmetic Operators A.6 Data Constructs in MATLAB Basic Data Constructs Building Arrays Cell Arrays A.7 Script Files and ...

Global site tag (gtag.js) - Google Analytics