1.

Solve : find directories that do NOT contain a certain file extension?

Answer»

for x in `FIND /vmfs/volumes/v01tstn01a01/ -type d`; do find $x -name '*.vmx' > /dev/null || echo $x; done;

The goal of this is to find the subdirectories that do NOT CONTAIN a file with the extension of .vmx


Any help would be great!Code: [Select]find . -type d |while read DIR
do
ls -A $DIR/*.vmx >/dev/null 2>&1 || echo "no vmx file: $DIR"
done



Discussion

No Comment Found