ETEST

Section: User Contributed Perl Documentation (1)
Updated: 2016-10-04
Index Return to Main Contents

NAME

etest - check file types and compare file attributes

SYNOPSIS

etest [-{option}] filedir

DESCRIPTION

Exit with the status determined by the truth or otherwise of the option applied to the attributes of filedir. It is a subset of test(1).

OPTIONS

-d
filedir exists and is a directory
-e
filedir exists (not yet implemented)
-f
filedir exists and is a regular file
-g
filedir exists and its set-group-ID bit is set
-G
filedir exists and is owned by the effective group ID
-k
filedir exists and its sticky bit is set
-O
filedir exists and is owned by the effective user ID
-r
filedir exists and read permission is granted
-s
filedir exists and has a size greater than zero
-u
filedir exists and its set-user-ID bit is set
-w
filedir exists and write permission is granted
-x
filedir exists and execute (or search) permission is granted

EXAMPLES

etest -w ec:filename
Do I have permission to write to ec:filename?

NOTES

Multiple tests on the same file result in multiple calls to the filesystem, which may be expensive in resources and time. There is, at present, no way of combining tests nor of caching results.

SEE ALSO

ecfs(1), echmod(1), echgrp(1)


Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
NOTES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 14:51:58 GMT, July 23, 2018