Search and Delete - MacOS script

Joined
Feb 8, 2023
Messages
2
Reaction score
0
Hi everyone, just to declare i am a total newbie to MacOS scripting, however, i trying to deploy a script to a few MacBooks to search for a file based on the data in the file and then delete the file, and possibly log the result. The script am trying to use is below but am not having much luck with it even if I run it from the terminal on my test Mac., any suggestion is appreciated

Script:
grep "url,username,password,totp,extra,name,grouping,fav" / -rl 2>/dev/null | xargs -I {} rm -v {}
 

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
11,106
Reaction score
497
Hello and welcome.

Sorry for the delayed response.

That is beyond my AppleScript/Automator experience. Maybe another member will chime in, or you could try the folks over at MacScripter.

C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top