I want to locate with and on a mac.

Asked 2 years ago, Updated 2 years ago, 71 views

The locate command is a command that lists files with matching paths when you specify a string (pattern).However, if you specify multiple patterns, this command searches under or conditions, and there seems to be no option for mac to work with and.

Question

  • I would like to list files from a terminal on a mac that have a path that hits all of them if you specify multiple strings.How can I do this?

sh macos

2022-09-30 21:27

1 Answers

  • Since it's a Mac, use & in mdfind (the CLI version of Spotlight).(Search expressions are a bit complicated)
  • Narrow the location results with grep

I guess it's around.


2022-09-30 21:27

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.