There are set of files to be monitored for audit purpose.
Source file contains the file name and its location on server.
Need to have shell script which generate a output file which is having the details of above files ( last modified user name ,lat update date,size) if its modified in last 1 day.
This shell script runs once a in day and generate the output and will mail this to set of user.
If any one have reusable code for this please share .
Appreciate your quick help on this.
I need to save the owner ,size and last modified date of a files into local variables of my shell script.
So that i can write this info into a different file.
Yes....my context is we have a audit requirement and need to develop shell script which generates a output with the details like
Last modified date, File Size, and User ID (for last modifier) .
Here we need to monitor only pre defined set of files not all files.
So I am developing shell script and need this command.
Please let me know is there any other way to find this.
OK. If you want to audit a pre defined set of files, so there is a way you can do this if your system is a Linux system and it has a kernel with the auditing infrastructure enabled ( a kernel built with CONFIG_AUDIT set to "yes"). You will need to use the auditd daemon. Have a look at this:
Well, I don't know how you can do this on the IBM AIX, but since it's a commercial grade Unix system, I'm almost sure there is way you can do this. Unfortunately the solution to this problem is totally system dependent.
I merged all three threads together. Please do not double post.
An NO: there is no one simple command line interface to audit files. You have to start a special process which records audit data. You then report against it, daily or weekly.
So, it will not be one shell script - it will require some system setup changes, and one or more scripts to report and manage auditing and audit files which can become huge. Fast.