.TH pavlov L .SH NAME \*Lpavlov \*O\(em Directory manager - Bailey's trainer .iX "checkpoint" .SH AUTHOR Craig DeForest .SH SYNOPSIS .sS \*Lpavlov [ {-sw, -nosw, -sw=foo} ] ... \*O .sE .SH DESCRIPTION \*Lpavlov\*O runs bailey periodically on the desired directory, and executes a specified command on new files in that directory. To prevent collisions with whatever drops the files in the directory, pavlov waits until the file has lain fallow for a specified number of minutes, before executing the command on it. .PP The waiting is accomplished by keeping a list of "pending" files that need to have the command executed on them. The pending file is updated after each batch of files is processed. .PP To echo the filename of any file with the extension ".txt" that is changed or created in the directories "foo" or "bar", at least 5 minutes after it was last touched, do this: .sS \*Lpavlov -dir="foo bar" -cmd=echo -age=5 .sE .PP After examining the directory and pending queue, and processing any necessary files, pavlov waits a while and does it all again. By default, it waits 5 minutes. You can specify minutes (minimum 1) with the "reptime" flag. .PP If you specify \'\-reptime=0\', pavlov will run through exactly once. .PP The command you specify is given the complete pathname of each file pavlov identifies. .SH OPTIONS pavlov uses a simple parser to understand each option. Given an option foo, you can enter three forms: -foo, -nofoo, and -foo=bar. These set foo to \'1\' (flag set), set foo to \'\' (flag clear), and set foo to \'bar\', respectively. .IP \-ext (string) This is a list of (space separated) file extensions to look for. If you don't specify it, pavlov uses all files in the specified directories; otherwise, it uses files with any of the extensions in the list. .IP \-log (string) The directory in which to log. This defaults to the value of the environment variable MDI_TEMP_DIR, or to /tmp if that doesn't exist. The log file is \"pavlov\-\\-log\", where \ is the command you specify with the -cmd flag. .IP \-cmd (string) The command to invoke. This can be an arbitrarily complicated shell command in the shell of the uid that will be running pavlov. If you include the word "{ARGS}" in the command string, it will be replaced with the names of the appropriate files. Otherwise, the filenames will be appended to the command (with whitespace in front of 'em). .IP \-age (int) The number of minutes a file must lie fallow before we consider it ready to touch. .IP \-reptime (int) The number of minutes to wait after each iteration, or 0 for one-time-through mode. .SH FILES .IP \/.pavlov-bailey This is the baileydb that pavlov uses. .IP \/pavlov- The current bailey-found-it-but-it's-not-old-enough queue lives here. is /tmp, or $MDI_TEMP_DIR, or the value of the \'-log\' switch. .IP \/pavlov--log A timestamped list of each time pavlov ran .