| author | Eric Renfro <psi-jack@gmail.com> |
| Fri, 28 Jun 2013 13:02:43 -0400 | |
| changeset 22 | 4bccc75a8a1c |
| parent 16 | 8dd31c2c72a5 |
| child 27 | e8cb759c60b4 |
| permissions | -rw-r--r-- |
|
1
29afbe10f498
Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff
changeset
|
1 |
# Filesystem related parameters |
|
29afbe10f498
Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff
changeset
|
2 |
|
|
29afbe10f498
Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff
changeset
|
3 |
# Returns age of last modification time of file $1 |
|
29afbe10f498
Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff
changeset
|
4 |
UserParameter=file.age[*],expr `date +%s` - `stat -f %m $1` |
|
29afbe10f498
Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff
changeset
|
5 |
|
| 16 | 6 |
# Returns file content |
7 |
UserParameter=file.content[*],cat $1 |
|
8 |
||
|
1
29afbe10f498
Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff
changeset
|
9 |
# Returns count of files in directory $1 |
|
29afbe10f498
Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff
changeset
|
10 |
UserParameter=dir.files[*],ls $1|wc -l |
|
29afbe10f498
Added base checks fs, fbsd, mysql
"Tomas Zeman <tzeman@volny.cz>"
parents:
diff
changeset
|
11 |
|
| 7 | 12 |
# Returns 0 if bzip2 test of file $1 passed. |
13 |
# Note: can't use just return code ($?) as bzip2 is too forgiving to corrupt archives. |
|
14 |
UserParameter=bzip2.test[*],bzip2 -q -t $1 2>&1|wc -l |