OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / GNU_sh-utils / original / man1 / test.1
1 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.012.
2 .TH TEST "1" "August 1999" "GNU sh-utils 2.0" FSF
3 .SH NAME
4 test \- check file types and compare values
5 .SH SYNOPSIS
6 .B test
7 \fIEXPRESSION\fR
8 .br
9 .B test
10 \fIEXPRESSION \fR]
11 .br
12 .B test
13 \fIOPTION\fR
14 .SH DESCRIPTION
15 .PP
16 .\" Add any additional description here
17 .PP
18 Exit with the status determined by EXPRESSION.
19 .TP
20 \fB\-\-help\fR
21 display this help and exit
22 .TP
23 \fB\-\-version\fR
24 output version information and exit
25 .PP
26 EXPRESSION is true or false and sets exit status.  It is one of:
27 .TP
28 ( EXPRESSION )
29 EXPRESSION is true
30 .TP
31 ! EXPRESSION
32 EXPRESSION is false
33 .TP
34 EXPRESSION1 \fB\-a\fR EXPRESSION2
35 both EXPRESSION1 and EXPRESSION2 are true
36 .TP
37 EXPRESSION1 \fB\-o\fR EXPRESSION2
38 either EXPRESSION1 or EXPRESSION2 is true
39 .TP
40 [-n] STRING
41 the length of STRING is nonzero
42 .TP
43 \fB\-z\fR STRING
44 the length of STRING is zero
45 .TP
46 STRING1 = STRING2
47 the strings are equal
48 .TP
49 STRING1 != STRING2
50 the strings are not equal
51 .TP
52 INTEGER1 \fB\-eq\fR INTEGER2
53 INTEGER1 is equal to INTEGER2
54 .TP
55 INTEGER1 \fB\-ge\fR INTEGER2
56 INTEGER1 is greater than or equal to INTEGER2
57 .TP
58 INTEGER1 \fB\-gt\fR INTEGER2
59 INTEGER1 is greater than INTEGER2
60 .TP
61 INTEGER1 \fB\-le\fR INTEGER2
62 INTEGER1 is less than or equal to INTEGER2
63 .TP
64 INTEGER1 \fB\-lt\fR INTEGER2
65 INTEGER1 is less than INTEGER2
66 .TP
67 INTEGER1 \fB\-ne\fR INTEGER2
68 INTEGER1 is not equal to INTEGER2
69 .TP
70 FILE1 \fB\-ef\fR FILE2
71 FILE1 and FILE2 have the same device and inode numbers
72 .TP
73 FILE1 \fB\-nt\fR FILE2
74 FILE1 is newer (modification date) than FILE2
75 .TP
76 FILE1 \fB\-ot\fR FILE2
77 FILE1 is older than FILE2
78 .TP
79 \fB\-b\fR FILE
80 FILE exists and is block special
81 .TP
82 \fB\-c\fR FILE
83 FILE exists and is character special
84 .TP
85 \fB\-d\fR FILE
86 FILE exists and is a directory
87 .TP
88 \fB\-e\fR FILE
89 FILE exists
90 .TP
91 \fB\-f\fR FILE
92 FILE exists and is a regular file
93 .TP
94 \fB\-g\fR FILE
95 FILE exists and is set-group-ID
96 .TP
97 \fB\-G\fR FILE
98 FILE exists and is owned by the effective group ID
99 .TP
100 \fB\-k\fR FILE
101 FILE exists and has its sticky bit set
102 .TP
103 \fB\-L\fR FILE
104 FILE exists and is a symbolic link
105 .TP
106 \fB\-O\fR FILE
107 FILE exists and is owned by the effective user ID
108 .TP
109 \fB\-p\fR FILE
110 FILE exists and is a named pipe
111 .TP
112 \fB\-r\fR FILE
113 FILE exists and is readable
114 .TP
115 \fB\-s\fR FILE
116 FILE exists and has a size greater than zero
117 .TP
118 \fB\-S\fR FILE
119 FILE exists and is a socket
120 .TP
121 \fB\-t\fR [FD]
122 file descriptor FD (stdout by default) is opened on a terminal
123 .TP
124 \fB\-u\fR FILE
125 FILE exists and its set-user-ID bit is set
126 .TP
127 \fB\-w\fR FILE
128 FILE exists and is writable
129 .TP
130 \fB\-x\fR FILE
131 FILE exists and is executable
132 .PP
133 Beware that parentheses need to be escaped (e.g., by backslashes) for shells.
134 INTEGER may also be \fB\-l\fR STRING, which evaluates to the length of STRING.
135 .SH "REPORTING BUGS"
136 Report bugs to <bug-sh-utils@gnu.org>.
137 .SH "SEE ALSO"
138 The full documentation for
139 .B test
140 is maintained as a Texinfo manual.  If the
141 .B info
142 and
143 .B test
144 programs are properly installed at your site, the command
145 .IP
146 .B info test
147 .PP
148 should give you access to the complete manual.
149 .SH COPYRIGHT
150 Copyright \(co 1999 Free Software Foundation, Inc.
151 .br
152 This is free software; see the source for copying conditions.  There is NO
153 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.