I've seen similar questions to this, but nothing I can find related directly to files.
Is there any way to give me a list of directories which do not contain a specific file?
Example:
/dir1/good
/dir1/stuff
/dir2/junk
/dir2/morejunk
/dir3/good
/dir4/junk
I'd like to run a find command where I would only return the directory names which do not contain the file 'good' (dir2 and dir4). Is there any way with find or some combo thereof to do this? The only way I can do this now is to run a find for the file 'good', save that output and use some awk, sort and comm -3 commands to get a diff for what I need.
Is there any easier way to do this?