wiki:check_file
Last modified 22 months ago Last modified on 08/04/2010 08:00:38 PM

check_file

Check age, size, owner, group and permission property of a file.

Usage

 check_file -f <FILE> [-w <warning age>] [-c <critical age>]

Options

-h, --help
Print detailed help screen.
-V, --version
Print version information.
-v, --verbose
Show details for command-line debugging.
-f, --file=filename
The file to test.
-w, --warning=time[d|h|m|s]
Return warning if the file age exceed this range.
-c, --critical=time[d|h|m|s]
Return critical if the file age exceed this range.
-W=size
Return warning if the file size exceed this range.
-C=size
Return critical if the file size exceed this range.
-o, --owner=uanme|uid
Return critical if the file don't belong to the user.
-g, --group=gname|gid
Return critical if the file don't belong to the group.
-a, -access=accessstring
Return critical if the file permission don't match the accessstring.

Access String Example

u+r
Check if file owner can read the file.
g=rx
Check if group can read, execute and not write.
o-rw
Check if others can't read nor write.