Linux – See what files are being written to (like iotop but for files, not processes)

debianfilesystemslinuxperformance

I have a Linux server, and it's doing a lot of disk io. There is one process that is doing most of the disk writes. I found this out with iotop, which shows the processes that are doing disk I/O. Is there an equivant programme (in the debian lenny apt repositories) that will show me what files are being written to? a 'top' like interface would be great? Is this even possible?

Best Answer

lsof may help if you know the process you want to watch:

lsof -p <pid> -r 5

-r is the number of seconds between checks.