I'm trying to list all video directories (not files) which don't end in a year e.g. (2015) and more specifically which don't have a year listed, therefore don't end in a closing bracket ).How can I do the opposite of the following:# List all files and directories end with '(2015)'ls -ld *\(2015\)# List all files and directories end with ')'ls -ld *\)Can anyone help explain how to do this?
Find directories excluding ending bracket ')'
find;ls
Try this:ls -ld *[^\)][] - set of characters that we are interested in^ - negation (so we include set of characters that we don't want)\) - escaped ')'