How do you list items with and without labels from the terminal?
Using ls, you can show the extended metadata of files:

$ ls -l@
-rw-r--r--@ 1 andrew  staff  1292910 Aug  9 11:36 labelled_file.jpg
    com.apple.metadata:kMDLabel_hlsi7t7nerhynemqvydgeb26de       50 


However, the quickest way to get labelled and unlabelled files is with an attribute search using mdfind:

$ mdfind -onlyin . -literal 'kMDItemFSLabel &gt; 0'  # labels have value 50
/cwd/labelled_file.jpg

$ mdfind -onlyin . -literal 'kMDItemFSLabel == 0'
/cwd/all.jpg
/cwd/other.jpg
/cwd/files.jpg