


TEST(1)                        FSF                        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 ]
       tteesstt _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

       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] STRING
              the length of STRING is nonzero

       --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 num
              bers

       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

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

       --LL FILE
              FILE exists and is a symbolic link

       --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 is readable

       --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 (stdout by default) is opened on
              a terminal

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

       --ww FILE
              FILE exists and is writable

       --xx FILE
              FILE exists and is executable

       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.

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

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.

CCOOPPYYRRIIGGHHTT
       Copyright  1999 Free Software Foundation, Inc.
       This is free software; see the source for  copying  condi
       tions.  There is NO warranty; not even for MERCHANTABILITY
       or FITNESS FOR A PARTICULAR PURPOSE.






GNU sh-utils 2.0            July 2000                           1


