This isn’t so much code as a useful command line trick for finding where a program is storing information.
A fellow programmer needed to find where crontab entries were stored so I showed him this trick. If you need to know where an application is saving state you can follow this simple 3 step process.
Create a file using touch. In this example the file is called TIMESTAMP.
touch TIMESTAMP
Now go about the process of running the application. In his case he edited his crontab entries:
crontab -e
You can then find every file on your hard drive that was modified after the TIMESTAMP file with this command:
find / -newer TIMESTAMP
If you are pretty sure that the data would need to be somewhere underneath your home directory you can use this alternative:
find ~ -newer TIMESTAMP
