Can the mdls command be used recursively in the macOS terminal? Is there an alternative that will get me a list of every file along with all the mdls info? ls has an option to get me some, but not nearly as many as mdls.
This is a followup question to In the macOS terminal, "ls | mdls" commands are only working for the home directory.
If you use the
globstarshell option (Bash 4.0 or newer1), you can do something like this:The output will look something like
with the disadvantage that path information is lost.
If you have many, many files, resulting in a command line that gets too long, you can loop over the files instead:
with output that looks something like
or you could use
find:GNU
find:BSD
find:1 Which, in macOS, you'd have to install first, for example using Homebrew.