GNU Rush – a restricted user shell (split by node):   Section:   Chapter:FastBack: Configuration File   Up: Matching Conditions   FastForward: Default Configuration   Contents: Table of ContentsIndex: Concept Index

4.4.2.3 File system tests

File system tests check file types and ownership. They are similar to options to test shell command:

-b file

file exists and is block special

-c file

file exists and is character special

-d file

file exists and is a directory

-e file

file exists

-f file

file exists and is a regular file

-g file

file exists and is set-group-ID

-G file

file exists and is owned by the primary group of the current user.

-h file
-L file

file exists and is a symbolic link

-k file

file exists and has its sticky bit set

-L file

file exists and is a symbolic link (same as -h)

-O file

file exists and is owned by the current user

-p file

file exists and is a named pipe

-r file

file exists and read permission is granted

-s file

file exists and has a size greater than zero

-S file

file exists and is a socket

-u file

file exists and its set-user-ID bit is set

-w file

file exists and write permission is granted

-x file

file exists and execute (or search) permission is granted

GNU Rush – a restricted user shell (split by node):   Section:   Chapter:FastBack: Configuration File   Up: Matching Conditions   FastForward: Default Configuration   Contents: Table of ContentsIndex: Concept Index