Topic
  • 1 reply
  • Latest Post - ‏2013-10-03T19:48:18Z by Nuffer
Nuffer
Nuffer
2 Posts

Pinned topic Newest log file but excluding one

‏2013-10-03T19:33:55Z |

I am trying to get information from the newest ".log" file except the avagent.log file which is continuously updated. A new log file is created nightly which I need to parse through for information. There are also other files in the same folder.

----UNIX Log Files----
<other files as well>
Sep 19 21:38      Americas_CST-ACI_Default_CST-1379638800826-5001-AIX.log
Sep 20 21:31      Americas_CST-ACI_Default_CST-1379725200792-5001-AIX.log
Sep 21 21:19      Americas_CST-ACI_Default_CST-1379811600824-5001-AIX.log
Sep 22 21:12      Americas_CST-ACI_Default_CST-1379898000816-5001-AIX.log
Sep 23 21:26      Americas_CST-ACI_Default_CST-1379984400940-5001-AIX.log
Sep 24 21:33      Americas_CST-ACI_Default_CST-1380070801385-5001-AIX.log
Sep 25 21:31      Americas_CST-ACI_Default_CST-1380157201230-5001-AIX.log
Sep 26 21:57      Americas_CST-ACI_Default_CST-1380243601220-5001-AIX.log
Oct 03 15:00      avagent.log  <---- This file is needs to be excluded.

----Relevance Language----
files whose (name of it does not contain "avagent" AND name of it contains ".log" AND modification time of it = maximum of modification times of files of parent folder of it) of folder "/var/avamar"

This will most likely return nothing since the filename and the latest modification time don't match the same files.

 

  • Nuffer
    Nuffer
    2 Posts

    Re: Newest log file but excluding one

    ‏2013-10-03T19:48:18Z  

    The answer is

    files whose (name of it does not contain "avagent" AND name of it contains ".log" AND creation time of it = maximum of creation times of files whose (name of it does not contain "avagent") of parent folder of it) of folder "C:\Program Files\avs\var\clientlogs"