.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33.
.TH [ "1" "March 2004" "[ 5.2.1" "User Commands"
.SH NAME
test \- check file types and compare values
.SH SYNOPSIS
.B test
\fIEXPRESSION\fR
.br
.B [
\fIEXPRESSION \fR]
.br
.B [
\fIOPTION\fR
.SH DESCRIPTION
.\" Add any additional description here
.PP
Exit with the status determined by EXPRESSION.
.TP
\fB\-\-help\fR
display this help and exit
.TP
\fB\-\-version\fR
output version information and exit
.PP
EXPRESSION is true or false and sets exit status. It is one of:
.TP
( EXPRESSION )
EXPRESSION is true
.TP
! EXPRESSION
EXPRESSION is false
.TP
EXPRESSION1 \fB\-a\fR EXPRESSION2
both EXPRESSION1 and EXPRESSION2 are true
.TP
EXPRESSION1 \fB\-o\fR EXPRESSION2
either EXPRESSION1 or EXPRESSION2 is true
.TP
[-n] STRING
the length of STRING is nonzero
.TP
\fB\-z\fR STRING
the length of STRING is zero
.TP
STRING1 = STRING2
the strings are equal
.TP
STRING1 != STRING2
the strings are not equal
.TP
INTEGER1 \fB\-eq\fR INTEGER2
INTEGER1 is equal to INTEGER2
.TP
INTEGER1 \fB\-ge\fR INTEGER2
INTEGER1 is greater than or equal to INTEGER2
.TP
INTEGER1 \fB\-gt\fR INTEGER2
INTEGER1 is greater than INTEGER2
.TP
INTEGER1 \fB\-le\fR INTEGER2
INTEGER1 is less than or equal to INTEGER2
.TP
INTEGER1 \fB\-lt\fR INTEGER2
INTEGER1 is less than INTEGER2
.TP
INTEGER1 \fB\-ne\fR INTEGER2
INTEGER1 is not equal to INTEGER2
.TP
FILE1 \fB\-ef\fR FILE2
FILE1 and FILE2 have the same device and inode numbers
.TP
FILE1 \fB\-nt\fR FILE2
FILE1 is newer (modification date) than FILE2
.TP
FILE1 \fB\-ot\fR FILE2
FILE1 is older than FILE2
.TP
\fB\-b\fR FILE
FILE exists and is block special
.TP
\fB\-c\fR FILE
FILE exists and is character special
.TP
\fB\-d\fR FILE
FILE exists and is a directory
.TP
\fB\-e\fR FILE
FILE exists
.TP
\fB\-f\fR FILE
FILE exists and is a regular file
.TP
\fB\-g\fR FILE
FILE exists and is set-group-ID
.TP
\fB\-h\fR FILE
FILE exists and is a symbolic link (same as \fB\-L\fR)
.TP
\fB\-G\fR FILE
FILE exists and is owned by the effective group ID
.TP
\fB\-k\fR FILE
FILE exists and has its sticky bit set
.TP
\fB\-L\fR FILE
FILE exists and is a symbolic link (same as \fB\-h\fR)
.TP
\fB\-O\fR FILE
FILE exists and is owned by the effective user ID
.TP
\fB\-p\fR FILE
FILE exists and is a named pipe
.TP
\fB\-r\fR FILE
FILE exists and is readable
.TP
\fB\-s\fR FILE
FILE exists and has a size greater than zero
.TP
\fB\-S\fR FILE
FILE exists and is a socket
.TP
\fB\-t\fR [FD]
file descriptor FD (stdout by default) is opened on a terminal
.TP
\fB\-u\fR FILE
FILE exists and its set-user-ID bit is set
.TP
\fB\-w\fR FILE
FILE exists and is writable
.TP
\fB\-x\fR FILE
FILE exists and is executable
.PP
Beware that parentheses need to be escaped (e.g., by backslashes) for shells.
INTEGER may also be \fB\-l\fR STRING, which evaluates to the length of STRING.
.SH AUTHOR
Written by Kevin Braunsdorf and Matthew Bradburn.
.SH "REPORTING BUGS"
Report bugs to .
.SH COPYRIGHT
Copyright \(co 2004 Free Software Foundation, Inc.
.br
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.SH "SEE ALSO"
The full documentation for
.B [
is maintained as a Texinfo manual. If the
.B info
and
.B [
programs are properly installed at your site, the command
.IP
.B info coreutils test
.PP
should give you access to the complete manual.
www.fiveanddime.net