Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Check for existence or non-existence of a file or files - using glob patterns.
Current Version
0.11
Last Release Date
2015-07-23
Owner
Mark Clarkson
Download URL
https://github.com/mclarkson/check_file_exists_glob
Compatible With
$ ./check_file_exists_glob -h
check_file_exists_glob - Alert if a FILE does not exist.
Usage: check_file_exists_glob [options] -d DIR FILE
FILE : The file to search for. Can glob using '*' etc, but place file names with glob patterns within quotes. Mandatory. The FILE must always be specified. -d DIR : Base directory to search in. Mandatory option - the DIR must always be specified. -i : Invert FILE, so alert if FILE does exist. -I : Alert if DIR does not exist. -p : Add performance data output for graphing. -w NUM : Warning alert if >=NUM files are found and invert files '-i' is on. (Default is: 1) -c NUM : Critical alert if >=NUM files are found and invert files '-i' is on. (Default is: 1) -h : Display this help text.
Example:
Check that /tmp/dir/file exists.
./check_file_exists_glob -d /tmp/dir file
Check that /tmp/dir/file does NOT exist.
./check_file_exists_glob -d /tmp/dir -i file
Again check that /tmp/dir/file does NOT exist but this time alert if the directory it could be found in, /tmp/dir, is missing.
./check_file_exists_glob -d /tmp -i -I file
Check for files matching the glob 'fi*' and alert if found in /tmp/dir. Alert if /tmp/dir does not exist. Provide performance data for graphing, showing the number of files matching the glob pattern.
./check_file_exists_glob -d /tmp/dir -i -I -p "fi*"
Same as previous but only alert if thresholds are exceeded. In this case issue a warning alert when there are 20 or more files found, critical for 30 or more.
./check_file_exists_glob -d /tmp/dir -i -I -p -w 20 -c 30 "fi*"
Is there anyway we can make it to check a web link to see if you the file download exist?
You must be logged in to submit a review.
To:
From: