Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HTML
<HTML><HEAD><TITLE>Manpage of ETEST</TITLE>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">

</HEAD><BODY>

<H1>ETEST</H1>

Section: User Contributed Perl Documentation (1)<BR>Updated: 2016-10-04<BR><A HREF="#index">Index</A>

<A HREF="http://confluence.ecmwf.int/display/UDOC/">Return to Main Contents</A><HR>













<A NAME="lbAB"> </A>

<H2>NAME</H2>



etest - check file types and compare file attributes

<A NAME="lbAC"> </A>

<H2>SYNOPSIS</H2>



<A NAME="ixAAC"></A>

etest [<I>-{option}</I>] <I>filedir</I>

<A NAME="lbAD"> </A>

<H2>DESCRIPTION</H2>



<A NAME="ixAAD"></A>

Exit with the status determined by the truth or otherwise

of the option applied to the attributes of <I>filedir</I>.

It is a subset of <I><A HREF="http://confluence.ecmwf.int/display/UDOC/test">test</A><<I>test</I>(1).

<A NAME="lbAE"> </A>

<H2>OPTIONS</H2>



<A NAME="ixAAE"></A>

<DL COMPACT>

<DT>-d<DD>

<A NAME="ixAAF"></A>

<I>filedir</I> exists and is a directory

<DT>-e<DD>

<A NAME="ixAAG"></A>

<I>filedir</I> exists (<I>not yet implemented</I>)

<DT>-f<DD>

<A NAME="ixAAH"></A>

<I>filedir</I> exists and is a regular file

<DT>-g<DD>

<A NAME="ixAAI"></A>

<I>filedir</I> exists and its set-group-ID bit is set

<DT>-G<DD>

<A NAME="ixAAJ"></A>

<I>filedir</I> exists and is owned by the effective group <FONT SIZE="-1">ID</FONT>

<DT>-k<DD>

<A NAME="ixAAK"></A>

<I>filedir</I> exists and its sticky bit is set

<DT>-O<DD>

<A NAME="ixAAL"></A>

<I>filedir</I> exists and is owned by the effective user <FONT SIZE="-1">ID</FONT>

<DT>-r<DD>

<A NAME="ixAAM"></A>

<I>filedir</I> exists and read permission is granted

<DT>-s<DD>

<A NAME="ixAAN"></A>

<I>filedir</I> exists and has a size greater than zero

<DT>-u<DD>

<A NAME="ixAAO"></A>

<I>filedir</I> exists and its set-user-ID bit is set

<DT>-w<DD>

<A NAME="ixAAP"></A>

<I>filedir</I> exists and write permission is granted

<DT>-x<DD>

<A NAME="ixAAQ"></A>

<I>filedir</I> exists and execute (or search) permission is granted

</DL>

<A NAME="lbAF"> </A>

<H2>EXAMPLES</H2>



<A NAME="ixAAR"></A>

<DL COMPACT>

<DT>etest -w ec:filename<DD>

<A NAME="ixAAS"></A>

Do I have permission to write to <I>ec:filename</I>?

</DL>

<A NAME="lbAG"> </A>

<H2>NOTES</H2>



<A NAME="ixAAT"></A>

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.

<A NAME="lbAH"> </A>

<H2>SEE ALSO</H2>



<A NAME="ixAAU"></A>

<I><A HREF="http://confluence.ecmwf.int/display/UDOC/ecfs.1">ecfs</A></I>(1), 
<I><A HREF="http://confluence.ecmwf.int/display/UDOC/echmod">echmod</A></I>(1), 
<I><A HREF="http://confluence.ecmwf.int/display/UDOC/echgrp">echgrp</A></I>(1)

<P>



<HR>

<A NAME="index"> </A><H2>Index</H2>

<DL>

<DT><A HREF="#lbAB">NAME</A><DD>

<DT><A HREF="#lbAC">SYNOPSIS</A><DD>

<DT><A HREF="#lbAD">DESCRIPTION</A><DD>

<DT><A HREF="#lbAE">OPTIONS</A><DD>

<DT><A HREF="#lbAF">EXAMPLES</A><DD>

<DT><A HREF="#lbAG">NOTES</A><DD>

<DT><A HREF="#lbAH">SEE ALSO</A><DD>

</DL>

<HR>

This document was created by

<A HREF="http://github.com/hamano/man2html/">man2html</A>,

using the manual pages.<BR>

Time: 14:51:58 GMT, July 23, 2018

</BODY>

</HTML>

...