| author | Tomas Zeman <tzeman@volny.cz> |
| Thu, 16 Aug 2018 14:39:42 +0200 | |
| changeset 34 | b685225d4966 |
| parent 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 |
|
| 26 | 15 |
|
16 |
# Returns file's content |
|
17 |
UserParameter=file.cat[*],cat $1 |