I am looking for a simple way to delete specific files from all users documents. I would expect the following would work, but it does not seem to. Am I missing something here?
rm -rf "/Users/*/Documents/Power Point Files/ppt1.potx"
rm -rf "/Users/*/Documents/Power Point Files/ppt2.potx"
You're likely going to be better served by running a while loop over the user directories. I'll also harken against using the -r flag for anything in a user directory unless you're extremely sure your syntax is correct. Probably best to add a simple if statement to detect the presence off the file in question and then delete just that item.