Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > How To: Is there any way to watch files being installed?

How To: Is there any way to watch files being installed?
Thread Tools
C.A.T.S. CEO
Professional Poster
Join Date: Nov 2004
Location: eating kernel
Status: Offline
Reply With Quote
Jul 4, 2007, 06:58 PM
 
Link

Not exactly what you describe, but you can use it to check before the installation.

edit: can somebody fix the database, Please?!
Signature depreciated.
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Jul 4, 2007, 07:07 PM
 
In the terminal, before you install:

ls -R / > before.txt

In the terminal, after you install:

ls -R / > after.txt
diff before.txt after.txt > diff.txt

And then open diff.txt in your text editor of choice.
     
gberz3
Forum Regular
Join Date: Jun 2007
Status: Offline
Reply With Quote
Jul 4, 2007, 07:09 PM
 
Hi all,

I'm interested in watching a few different PKG files as they're installed. I've done a "man installer" from the command line but I can't seem to find anything useful. Basically I need a bit of "tripwire" functionality to see *EXACTLY* what is being done, even the pre and post script features that won't necessarily be in a ".plist" file.

Any ideas?

Thanks in advance. . .
     
gberz3
Forum Regular
Join Date: Jun 2007
Status: Offline
Reply With Quote
Jul 4, 2007, 08:20 PM
 
Originally Posted by mduell View Post
In the terminal, before you install:
ls -R / > before.txt
In the terminal, after you install:
ls -R / > after.txt
diff before.txt after.txt > diff.txt
And then open diff.txt in your text editor of choice.

Thanks, mduell, but that's a bit overly simplistic. I need to know *everything* that occurs during install. Not just the "obvious" files that are places. Plus "ls" assumes that I know which directories to check. I basically need a "supervisor" process that checks everything an installer does.

. . .thanks for the suggestion though.
     
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Jul 4, 2007, 09:04 PM
 
Originally Posted by gberz3 View Post
Thanks, mduell, but that's a bit overly simplistic. I need to know *everything* that occurs during install. Not just the "obvious" files that are places. Plus "ls" assumes that I know which directories to check. I basically need a "supervisor" process that checks everything an installer does.

. . .thanks for the suggestion though.
ls -R /
will check ALL directories, so there is no assumption about knowing which directories to check.

("ls -aR /" would also check for hidden files)
     
gberz3
Forum Regular
Join Date: Jun 2007
Status: Offline
Reply With Quote
Jul 4, 2007, 09:09 PM
 
Originally Posted by mduell View Post
ls -R / lists all directories, so you don't need to pick any. Add the flag for timestamps and you'd see files that changed in addition to files that were added deleted.

If the installer does something that doesn't add, change, or delete a file, does it really matter? It will be gone on the next reboot.
Fair enough. Still I'd rather have a solution in realtime; not take a snapshot, do some stuff, take another snapshot and diff. This can get rather tedious when doing software installation test, etc.

. . .either way, thank you for clarification of your suggestion.

Regards
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Jul 4, 2007, 09:43 PM
 
Originally Posted by gberz3 View Post
Thanks, mduell, but that's a bit overly simplistic. I need to know *everything* that occurs during install. Not just the "obvious" files that are places. Plus "ls" assumes that I know which directories to check. I basically need a "supervisor" process that checks everything an installer does.

. . .thanks for the suggestion though.
ls -R / lists all directories, so you don't need to pick any. Add the flag for timestamps and you'd see files that changed in addition to files that were added deleted.

If the installer does something that doesn't add, change, or delete a file, does it really matter? It will be gone on the next reboot.
     
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Jul 4, 2007, 11:13 PM
 
Originally Posted by gberz3 View Post
Fair enough. Still I'd rather have a solution in realtime; not take a snapshot, do some stuff, take another snapshot and diff. This can get rather tedious when doing software installation test, etc.

. . .either way, thank you for clarification of your suggestion.

Regards
Wasn't my suggestion (just my clarification), but you're welcome, in any case.

For packages, there are tools to look into the content of the package to see exactly what will be installed, and where, but I'm can't think of anything that will actually tell you what files are being written in real time (filesystem-wide). Such a thing should certainly be possible since 10.4, when Apple enabled file system notifications in an application-accessible manner (ie, the mechanism by which Finder windows are now updated automatically as file system content changes).

edit: found the doco for this at: File-System Performance Guidelines: Tracking File-System Changes
Seems that these notifications do not provide enough information to do what your after (they merely notify that a change has occurred, and it's up to the receiver to resync their view of the file system).
( Last edited by Brass; Jul 4, 2007 at 11:20 PM. )
     
Simon
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jul 5, 2007, 02:40 AM
 
I often use a snapshot approach like
code:
sudo ls -alR / > fsdump.tmp
...
sudo ls -alR / > fsdump2.tmp
diff fsdump.tmp fsdump2.tmp


But if you are more interested in seeing "real time" changes to files fseventer will help.

Of course if you're using the normal OS X package installer, just before you hit install chose File > Show Files to list what's going to be installed.
( Last edited by Simon; Jul 5, 2007 at 02:50 AM. )
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:27 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,