Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List of files changed in AIX 5.3

Status
Not open for further replies.

balajipn

Programmer
Mar 30, 2004
65
IN
Hi,

I need to find a list of files that have changed with in thet last 5 minutes in AIX 5.3. Can some one help me with this?.

The find command seems to handle files that have changed with in a day or multiples of days. It doesn't seem to deal with minutes.

Thanks,
Balaji.
 
Set up a cron script to touch a file every five minutes say touch /tmp/minute.`date +%M` this will create a zero length files in /tmp like minute.10, minute.15 etc, then run the find command using the -newer option find . -type f -newer /tmp/minute.xx where xx matches the /tmp/minute. file you want to use. This will give you all files that have changed since the /tmp/minute.xx was created.
 
I use ls -alt | more in a directory to sort the files by the recent changed on top!

You can as well put the R option to do it recursively

ls -altR | more

Put as you see this is not the best solution :)

Regards,
Khalid
 
Use the -mmin find option:


[tt]find /your/dir -type f -mmin -5[/tt]


should find files that have changed within the last 5 minutes

see man page for find.


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top