conf/fs.conf
author Tomas Zeman <tzeman@volny.cz>
Wed, 01 Jun 2011 14:32:27 +0200
changeset 26 48810ea292c2
parent 7 0cd47f29bdfb
child 27 e8cb759c60b4
permissions -rw-r--r--
conf/fs.conf: added file.cat

# Filesystem related parameters

# Returns age of last modification time of file $1
UserParameter=file.age[*],expr `date +%s` - `stat -f %m $1`

# Returns count of files in directory $1
UserParameter=dir.files[*],ls $1|wc -l

# Returns 0 if bzip2 test of file $1 passed.
# Note: can't use just return code ($?) as bzip2 is too forgiving to corrupt archives.
UserParameter=bzip2.test[*],bzip2 -q -t $1 2>&1|wc -l

# Returns file's content
UserParameter=file.cat[*],cat $1