I'm using Xubuntu 20.04. I have put emblems on many directories. Is there a way in a bash script to list all directories with emblems on them, or with a certain emblem?
Thanks
Emblems are stored as metadata using special metadata::emblems attribute.
You can get the emblem for needed file by executing the following command:
gio info -a "metadata::emblems" ~/folder/filename
So this can be scripted using find, grep with command like shown below:
find ~/Desktop -type f -exec sh -c "gio info -a metadata::emblems '{}' | grep emblems && echo '^ found in {}'" \;
on my Ubuntu MATE and Xubuntu systems it returns the icon with emblem:
metadata::emblems: [development] ^ found in /home/user/Desktop/filename
Searching for certain emblem is possible, you can adapt the search command by yourself.