I have a folder structure like this (this is a small snippet):
βββ test βββ cases βββ model βββ client β βββ socketsTest.coffee βββ server β βββ socketsTest.coffee βββ shared βββ findersTest.coffee
The question is, how do you list all the paths that end in .coffee and do not exist in the client folder?
The following command returns all files matching .coffee that exist in the server folder:
find test -name "*Test.coffee" | egrep '/*server*/'
But I really need a regular expression that matches everything except that in the client folder.
What is the cleanest way to do this on * nix? The final goal is to return the files not inside the client folder, so for the tree above, it will
$ <find files except those a client folder> test/cases/model/server/socketsTest.coffee test/cases/model/shared/findersTest.coffee
I tried to do something similar, but no luck:
find test -name "*Test.coffee" | egrep '*model/[^client]*'
source share