Finding open files on your Macintosh

I have a problem at work regarding Final Cut Pro opening very slowly. I know that it is caused by the Sophos anti virus software, but their is no way of seeing which files it is scanning. I was researching this and found this Unix command.

lsof (List Open Files)

Typing this into the Terminal It will list all your open files and I mean all of them! It will be a long list. You can filter by using the -c command. For example lsof -c Final will list all the open files that are running under Command column that begins Final. It is case sensitive so final will return nothing.

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Final\x20 9088 xxxxxx cwd DIR 14,9 1088 2 /
Final\x20 9088 xxxxxx txt REG 14,9 17093696 1978666 /Applications/Final Cut Pro.app/Contents/MacOS/Final Cut Pro
Final\x20 9088 xxxxxx txt REG 14,9 111908 1978660 /Applications/Final Cut Pro.app/Contents/Frameworks/ProTimecode.framework/Versions/A/ProTimecode

You can also list open files by their pid. For example, lsof -p 9088,9110,9912 will list all the open files for these PIDs 9088,9110 and 9912. You can find the pid your application is running under via Activity Monitor which can be found in the Applications/Utilities folder.
|
Web Analytics