Is there a command that can tell the label status (labels as applied in the info menu in the finder cmd+i) of an item from the command-line in OS X? Essentially, I just want to list all the items with or without labels in the current directory, but I can't find any way to pull them appart.
This will help in creating a timed script that runs in the background. Then I can apply a label in finder and expect an action automatically apply to that file without having to make special conditions or keep a curated file with a list.
Best Answer
Using
ls
, you can show the extended metadata of files:However, the quickest way to get labelled and unlabelled files is with an attribute search using
mdfind
: