File System

File Age Check

Description:

This Python script works on both Windows and *nix boxes and returns the date of the file (modified, access, or create) in human understandable form. (Only English.)

Current Version

Last Release Date

June 23, 2009

Compatible With


Project Files
Project Notes
Will check Windows serversharepathfile type addresses, but you may need to alter the NRPE Service privilege to do so. Return the basename of the file with the time date information as well as the type of time it checked. Usage: check_fileage.py -f /mount/path/file.ext -w nnnn -c nnnn C|M -V -h Tested on Window W2K3 and XP, and Centos 4.4 using Python 2.5
Reviews (2) Add a Review
Extension for how to treat missing files
by u.joss, May 31, 2017

Thanks for the script. I had an additional requirement where a missing file is OK. I therefore extended the script with the optional parameters -x or -X to define the response on missing files. -x, --fail-on-not-exists Returns WARN if the file does not exist. -X, --ok-on-not-exists Returns OK if the file does not exist. If somebody is interested in that, you can find it here: https://github.com/ursjoss/check_fileage



Worked Well!!!!!!!!!!
by nishith, August 31, 2012

###COMMAND OUTPUT### ./check_fileage.py -f /backup/192.168.10.10/rsync/nfs_file_logs -w 1440 -c 2880 Note:Here, 1440 means 1 days & 2880 means 2 days. Command Result is: OK: nfs_file_logs has a modified date of Mon 06 Aug/2012 18:41 Make below entry in "commands.cfg" define command{ command_name check_fileage command_line $USER1$/check_fileage.py -f n Fedora/CentOS/RedHat platform only.



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
5 (4)
Favorites
1
Views
145,485