General discussion

Locked

file modification date

By stevelil ·
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?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Jaqui In reply to file modification date

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.

Collapse -

by stevelil In reply to

don't have fam installed

Collapse -

by Gary_W In reply to file modification date

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

Collapse -

by stevelil In reply to

not quite what i was looking for

Collapse -

by stevelil In reply to file modification date

This question was closed by the author

Back to Linux Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums