I need to build a list of files present in a directory but also pass in a file containing a list of directories to exclude.
I've seen the below suggestion but I've had no luck with it when it comes to the type flag:
find $dir_name $(printf "! -name %s " $(cat $exclude_file))
Is there a way I can do it or will I need to create the entire list and then work through it removing ones that partially match ones in the exclude directory.