TEST(1)                          User Commands
TEST(1)



NNAAMMEE
       test - check file types and compare values

SSYYNNOOPPSSIISS
       tteesstt _E_X_P_R_E_S_S_I_O_N tteesstt

       [[ _E_X_P_R_E_S_S_I_O_N ] [[ ] [[
       _O_P_T_I_O_N

DDEESSCCRRIIPPTTIIOONN
       Exit with the status determined by EXPRESSION.

       ----hheellpp display this help and exit

       ----vveerrssiioonn
              output version information and exit

       An omitted EXPRESSION defaults to false.  Otherwise,
       EXPRESSION is true or false and sets exit status.
       It is one of:

       ( EXPRESSION )
              EXPRESSION is true

       ! EXPRESSION
              EXPRESSION is false

       EXPRESSION1 --aa EXPRESSION2
              both EXPRESSION1 and EXPRESSION2 are true

       EXPRESSION1 --oo EXPRESSION2
              either EXPRESSION1 or EXPRESSION2 is true

       --nn STRING
              the length of STRING is nonzero

       STRING equivalent to --nn STRING

       --zz STRING
              the length of STRING is zero

       STRING1 = STRING2
              the strings are equal

       STRING1 != STRING2
              the strings are not equal

       INTEGER1 --eeqq INTEGER2
              INTEGER1 is equal to INTEGER2

       INTEGER1 --ggee INTEGER2
              INTEGER1 is greater than or equal to INTEGER2

       INTEGER1 --ggtt INTEGER2
              INTEGER1 is greater than INTEGER2

       INTEGER1 --llee INTEGER2
              INTEGER1 is less than or equal to INTEGER2

       INTEGER1 --lltt INTEGER2
              INTEGER1 is less than INTEGER2

       INTEGER1 --nnee INTEGER2
              INTEGER1 is not equal to INTEGER2

       FILE1 --eeff FILE2
              FILE1 and FILE2 have the same device and
              inode numbers

       FILE1 --nntt FILE2
              FILE1 is newer (modification date) than FILE2

       FILE1 --oott FILE2
              FILE1 is older than FILE2

       --bb FILE
              FILE exists and is block special

       --cc FILE
              FILE exists and is character special

       --dd FILE
              FILE exists and is a directory

       --ee FILE
              FILE exists

       --ff FILE
              FILE exists and is a regular file

       --gg FILE
              FILE exists and is set-group-ID

       --GG FILE
              FILE exists and is owned by the effective
              group ID

       --hh FILE
              FILE exists and is a symbolic link (same
              as --LL)

       --kk FILE
              FILE exists and has its sticky bit set

       --LL FILE
              FILE exists and is a symbolic link (same
              as --hh)

       --OO FILE
              FILE exists and is owned by the effective user ID

       --pp FILE
              FILE exists and is a named pipe

       --rr FILE
              FILE exists and read permission is granted

       --ss FILE
              FILE exists and has a size greater than zero

       --SS FILE
              FILE exists and is a socket

       --tt FD  file descriptor FD is opened on a terminal

       --uu FILE
              FILE exists and its set-user-ID bit is set

       --ww FILE
              FILE exists and write permission is granted

       --xx FILE
              FILE exists and execute (or search) permission
              is granted

       Except for --hh and  --LL,  all  FILE-related
       tests  dereference  symbolic links.   Beware  that
       parentheses  need  to be escaped (e.g., by back‐
       slashes) for shells.  INTEGER may also be --ll STRING,
       which evaluates to the length of STRING.

       NOTE:  your shell may have its own version of test
       and/or [, which usu‐ ally supersedes the version
       described  here.   Please  refer  to  your shell's
       documentation for details about the options it supports.

AAUUTTHHOORR
       Written by Kevin Braunsdorf and Matthew Bradburn.

RREEPPOORRTTIINNGG BBUUGGSS
       Report bugs to <bug-coreutils@gnu.org>.

CCOOPPYYRRIIGGHHTT
       Copyright © 2006 Free Software Foundation, Inc.
       This  is  free  software.   You may redistribute
       copies of it under the terms      of      the
       GNU      General       Public       License
       <http://www.gnu.org/licenses/gpl.html>.   There  is
       NO WARRANTY, to the extent permitted by law.

SSEEEE AALLSSOO
       The full documentation for tteesstt is maintained
       as a Texinfo manual.   If the  iinnffoo  and
       tteesstt  programs are properly installed at your
       site, the command

              iinnffoo tteesstt

       should give you access to the complete manual.



test 6.7                         December 2006
TEST(1)
