I am trying to discover what application is creating a file in /private/tmp.
I've temporarily turned off sip on this Mac.
I created a shell script:
#!/bin/bash
sudo iosnoop -f /private/tmp/AlTest1.err > /private/tmp/iosnoop.txt
I created a crontab to run that shell script at reboot:
$crontab -e
#run at reboot
@reboot /Users/username/Desktop/run_iosnoop.sh
Upon restarting I only get the headers for the iosnoop command in my iosnoop.txt file
UID PID D BLOCK SIZE COMM PATHNAME
How can I keep iosnoop
running during and after reboot to catch the application that is creating this file?
I tried using @login
instead of @reboot
but it's not a valid timestamp for cron on mac.
The issue is this command has to have high enough priority that it runs before other processes run.