+
+
+
+TEST(1L) TEST(1L)
+
+
+N\bNA\bAM\bME\bE
+ test - check file types and compare values
+
+S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
+ t\bte\bes\bst\bt [expr]
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+ This manual page documents the GNU version of t\bte\bes\bst\bt.
+
+ t\bte\bes\bst\bt returns a status of 0 (true) or 1 (false) depending
+ on the evaluation of the conditional expression _\be_\bx_\bp_\br.
+ Expressions may be unary or binary. Unary expressions are
+ often used to examine the status of a file. There are
+ string operators and numeric comparison operators as well.
+
+ -\b-b\bb _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is block special.
+ -\b-c\bc _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is character special.
+ -\b-d\bd _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is a directory.
+ -\b-e\be _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists
+ -\b-f\bf _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is a regular file.
+ -\b-g\bg _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is set-group-id.
+ -\b-k\bk _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be has its ``sticky'' bit set.
+ -\b-L\bL _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is a symbolic link.
+ -\b-p\bp _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is a named pipe.
+ -\b-r\br _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is readable.
+ -\b-s\bs _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and has a size greater than
+ zero.
+ -\b-S\bS _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is a socket.
+ -\b-t\bt [\b[_\bf_\bd]\b]
+ True if _\bf_\bd is opened on a terminal. If _\bf_\bd is omit-
+ ted, it defaults to 1 (standard output).
+ -\b-u\bu _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and its set-user-id bit is set.
+ -\b-w\bw _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is writable.
+ -\b-x\bx _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is executable.
+ -\b-O\bO _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is owned by the effective
+ user id.
+ -\b-G\bG _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be exists and is owned by the effective
+
+
+
+ 1
+
+
+
+
+
+TEST(1L) TEST(1L)
+
+
+ group id.
+ _\bf_\bi_\bl_\be_\b1 -n\bnt\bt _\bf_\bi_\bl_\be_\b2
+ True if _\bf_\bi_\bl_\be_\b1 is newer (according to modification
+ date) than _\bf_\bi_\bl_\be_\b2.
+ _\bf_\bi_\bl_\be_\b1 -o\bot\bt _\bf_\bi_\bl_\be_\b2
+ True if _\bf_\bi_\bl_\be_\b1 is older than file2.
+ _\bf_\bi_\bl_\be_\b1 -\b-e\bef\bf _\bf_\bi_\bl_\be
+ True if _\bf_\bi_\bl_\be_\b1 and _\bf_\bi_\bl_\be_\b2 have the same device and
+ inode numbers.
+ -\b-z\bz _\bs_\bt_\br_\bi_\bn_\bg
+ True if the length of _\bs_\bt_\br_\bi_\bn_\bg is zero.
+ -\b-n\bn _\bs_\bt_\br_\bi_\bn_\bg
+ _\bs_\bt_\br_\bi_\bn_\bg True if the length of _\bs_\bt_\br_\bi_\bn_\bg is non-zero.
+ _\bs_\bt_\br_\bi_\bn_\bg_\b1 =\b= _\bs_\bt_\br_\bi_\bn_\bg_\b2
+ True if the strings are equal.
+ _\bs_\bt_\br_\bi_\bn_\bg_\b1 !\b!=\b= _\bs_\bt_\br_\bi_\bn_\bg_\b2
+ True if the strings are not equal.
+ !\b! _\be_\bx_\bp_\br True if _\be_\bx_\bp_\br is false.
+ _\be_\bx_\bp_\br_\b1 -a\ba _\be_\bx_\bp_\br_\b2
+ True if both _\be_\bx_\bp_\br_\b1 and _\be_\bx_\bp_\br_\b2 are true.
+ _\be_\bx_\bp_\br_\b1 -o\bo _\be_\bx_\bp_\br_\b2
+ True if either _\be_\bx_\bp_\br_\b1 or _\be_\bx_\bp_\br_\b2 is true.
+ _\ba_\br_\bg_\b1 O\bOP\bP _\ba_\br_\bg_\b2
+ O\bOP\bP is one of -\b-e\beq\bq, -\b-n\bne\be, -\b-l\blt\bt, -\b-l\ble\be, -\b-g\bgt\bt, or -\b-g\bge\be.
+ These arithmetic binary operators return true if
+ _\ba_\br_\bg_\b1 is equal, not-equal, less-than, less-than-or-
+ equal, greater-than, or greater-than-or-equal than
+ _\ba_\br_\bg_\b2, respectively. _\ba_\br_\bg_\b1 and _\ba_\br_\bg_\b2 may be positive
+ integers, negative integers, or the special expres-
+ sion -\b-l\bl _\bs_\bt_\br_\bi_\bn_\bg, which evaluates to the length of
+ _\bs_\bt_\br_\bi_\bn_\bg.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+