Displaying days since file modification

Hello all,

I am brand new into the bigfix world and need help with trying to make a script that displays how many days have passed since a file has been modified. I have a script that displays the date the files have been modified but cant figure out how to modify it to display how many days have passed using that string value it pulls.

concatation “;” of (substrings (5,11) of (modification times of find files “*jar” of folder “cpt/rant/frame/” as string))

This string displays the dates as: 14 mar 2022;14 mar 2022

Is there a way to modify the script to count the number of days since modification time?

Thanks

Here you can query what inspector you are looking for use or what is most relevant - https://developer.bigfix.com/relevance/search/?query=modific

image

And if we want to get the passed days since file modified, we can go something like -

from Linux -
Q: (now - modification time of file “/etc/passwd”)/day
A: 117
T: 181

From Windows -
Q: (now - modification time of file “C:\Program Files (x86)\BigFix Enterprise\BES Client\msvcr110.dll”)/day
A: 237
T: 0.214 ms

2 Likes