I'm trying to figure out the best way to accomplish removing two files from every local account on a Mac. The files are in the user Library at /Users/username/Library/Preferences and /Users/username/Library/Preferences/ByHost
The file at the top level of the user Preferences folder is named identically for all machines. However, the file inside ByHost is appended with the hardware UUID, which is going to be different on each machine. Can I use a wildcard in the script to remove that file or are wildcards generally discouraged? I'd like the script to run whether a user is logged in or not. Willing to try anything if there is a better option.