

Ask HN: Monitoring Installs on OS X - jman1

I am curious to find out what files are being installed and where on my hdd when I install a program on my HDD. I am wondering if there is a way to start a 'monitor' before the installer runs such that it will show hdd/filesystem activity and that will show what new files/directories were created and which existing ones were touched modified.<p>Atleast in Windows, I knew where the files were install most of the time and if I wanted to remove something i could clean up manually what the uninstaller left out. AS for OS X i have no idea where stuff goes when a installer is used. I understand that straight forward apps are packages/directories themselves and contain most the files. But what happens when the program comes with a installer (say ms office or something like that)<p>Does OS X apps follow a certain structure like linux where configs go in one location, binaries in another and so on.<p>If anybody can point me in the right direction or explain what goes on when a program is installed that will great. Thanks.
======
glitch
File system monitoring:

    
    
      • sudo fs_usage
      • sudo opensnoop
      • lsof
    

With respect to package-based installations:

    
    
      • /Users/*/Library/Receipts/
      • /Library/Receipts/
    

Tools of interest (check man pages):

    
    
      • /usr/bin/lsbom SomeBOM.bom
      • /usr/bin/defaults read /Path/To/Receipt/org.example.foo.plist (Explicit, general PList reading example.)
      • /usr/bin/defaults read net.example.Bar (Searches in Preferences locations for matching name.)
      • /usr/bin/installer
    

Preferences (configurations):

    
    
      • /Library/Preferences/ (Computer-wide, Local Preferences)
      • /Users/*/Library/Preferences/ (User Preferences)
    

Application Support (serials, etc.):

    
    
      • /Library/Application Support/
      • /Users/*/Library/Application Support/
    

Further/related readings:

[https://developer.apple.com/library/mac/#documentation/MacOS...](https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/UserPreferences.html)

[http://developer.apple.com/library/mac/#documentation/FileMa...](http://developer.apple.com/library/mac/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW14)

[http://www.gnustep.org/resources/documentation/User/GNUstep/...](http://www.gnustep.org/resources/documentation/User/GNUstep/filesystem.html)

[http://osxdaily.com/2011/04/22/monitor-mac-os-x-
filesystem-u...](http://osxdaily.com/2011/04/22/monitor-mac-os-x-filesystem-
usage-access-with-opensnoop/)

[http://hints.macworld.com/article.php?story=2006081704414926...](http://hints.macworld.com/article.php?story=20060817044149264)

[http://developer.apple.com/library/mac/#featuredarticles/Fil...](http://developer.apple.com/library/mac/#featuredarticles/FileSystemEvents/_index.html)

[http://superuser.com/questions/97980/view-filesystem-
access-...](http://superuser.com/questions/97980/view-filesystem-access-in-
real-time-on-mac-os-x)

[https://developer.apple.com/library/mac/#documentation/Darwi...](https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/pkgutil.1.html)

[http://developer.apple.com/library/mac/#documentation/Develo...](http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/PackageMakerUserGuide/Introduction/Introduction.html)

<http://support.apple.com/kb/TA26118?viewlocale=en_US>

Note: Different tools are available/unavailable in different versions of OS X.

~~~
jman1
Thanks Man ! Will learn a few new commands as well.

