Discussion Locked

file modification date

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to write a ksh script on an AIX machine which involves retrieving a file's mod date in the format yyyyjjj where jjj = julian day.
Is this possible?

5 replies

by jaqui

yes, you can pull a list of files modified on a specific day, or time.

or after that day.

either by reading last modified date/timestamp,
or ( if installed and running ) grepping the log from fam ( file alteration monitor )

personally, I would use fam, and log the activity on a daily basis, then you can easily look through all the files accessed on any given day.

by gary_w

Read up on the istat command, which will give you the modification date of a file. Grep out the line containing the modification date. Assign it to a variable then parse it to get the parts to pass to the shell function as mentioned in my other thread (with your ID mentioned) to convert it to a julian date.

Gary

This discussion is closed to new replies.