Use test to check for condition with find and execdir option
        Posted  
        
            by 
                slosd
            
        on Super User
        
        See other posts from Super User
        
            or by slosd
        
        
        
        Published on 2012-10-24T22:26:00Z
        Indexed on 
            2012/10/24
            23:04 UTC
        
        
        Read the original article
        Hit count: 233
        
I think I can keep my question short. Why does the following command produce no output?
find /usr/share/themes -mindepth 1 -maxdepth 1 -type d -execdir test -d {}/gnome-shell \;
I expected it to print all folders in /usr/share/themes that contain a folder gnome-shell.
Several websites suggest that this usage of test as a command in exec/execdir is possible. 
From man find:
-exec command ;
              Execute  command;  true  if 0 status is returned. [...]
        © Super User or respective owner