lsof (List open files) is a very useful admin command
It will List open files and tell you what process and user has a file open.

Some useful examples with this command:
Code:
lsof +D /tmp
This will list the processes that have open files in /tmp directory.

Code:
lsof -c php
This command will list the files and processes opened by the php command.

Code:
lsof /dev/cdrom
Lists what files are open on CD (can be used for other devices)

Code:
lsof -i TCP:80
Shows open TCP files for port 80

Code:
lsof -u root
Will list all open files by user root

Code:
lsof -p PID
*Replace PID with a real PID, and it will lists all files open by that PID