
470
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
-n Disable checking for lost connections with TCP keep-alives.
-X type
Disable authentication type.
test
test expression
[expression]
Evaluate an expression and, if its value is true, return a zero exit
status; otherwise, return a nonzero exit status. In shell scripts, you
can use the alternate form [expression]. This command is generally
used with conditional constructs in shell programs. Also exists as a
built-in in most shells.
File testers
The syntax for all of these options is test option file. If the specified
file does not exist, they return false. Otherwise, they test the file as
specified in the option description.
-b Is the file block special?
-c Is the file character special?
-d Is the file a directory?
-e Does the file exist?
-f Is the file a regular file?
-g Does the file have the set-group-ID bit set?
-k Does the file have the sticky bit set?
-L, -h
Is the file a symbolic link?
-p Is the file a named pipe?
-r Is the file readable by the current user?
-s Is the file nonempty?
-S Is the file a socket?
-t [file-descriptor]
Is the file associated with file-descriptor (or 1, standard output,
by default) connected to a terminal?
-u Does the file have the set-user-ID bit set?
-w Is the file writable by the current user?
-x Is the file executable?
-O Is the file owned ...