1

Is there a way to search for all property list files that contain a certain string? Spotlight doesn't search inside .plist files. Yes, I have 'System Files Are Included'.

For example, say a plist (the name of which is unknown) contains <string>abc</string>. Is there a way to search through the entire Mac for and output the file location of said plist?

1

EasyFind (Freeware) will find anything.

It will be slow, because it doesn't use an index, it searches file by file - but it will find it if it's there.

[No affiliation, just a satisfied user]

  • What happens if the plist is binary? – Mark Jan 28 at 19:11
  • then maybe you'd have to search for it in binary. It's not a situation I've ever encountered... nor ever expect to. – Tetsujin Jan 28 at 19:12
  • I’ll second the use of EasyFind. It’s a great app, that I find myself using often. It will search any kind of file, including binary ones. – user128998 Jan 28 at 19:45
0

The built-in defaults command has the option: /usr/bin/defaults find word

From the man page:

Searches for word in the domain names, keys, and values of the user's defaults, and prints out a list of matches.

  • The OP asked "Is there a way to search through the entire Mac for and output the file location of said plist?" and while the defaults find word command can find a match, that command as is doesn't output the file location as requested in the OP. It also does not search the entire filesystem as requested. – user3439894 Jan 28 at 17:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .