File events

Top  Previous  Next

File events may be used to condition the execution of a job depending on the presence and eventually on the properties of a specified file. XBM may simply test the availability or check for the size and/or the permission of a file, using the follow event modifies:

notempty

File length must be greater than zero 

read

File must be readable 

write

File must be writable 

I.e.

#!/bin/csh
#
#@xbm wait file /var/tmp/upload.txt
#@xbm wait file /etc/passwd notempty readable
#

In the sample above, job waits for:

file /var/tmp/upload.txt to be present on file system
file /etc/passwd to be not empty and readable