I'm trying to find files in some dir and ignore some path.
cd /some/dir && find . -type f ! -path ./media
doesn't work. Where is a mistake?
Any directory with the same name in subdirs shouldn't be ignored. E.g./some/media/
.
P.S. Also mask ./media/*
does not work too.
P.P.S Yeah, I know I can use grep
like grep -vE "^(\./dir1|\./dir2)"
. Any chance to use find only?