"find" files in the current directory, but skip some specific subdirectories
I wonder how to specify the command find
to search for files in the current directory, but skip some specific subdirectories.
For example, I would like to skip subdirectories that match ./dir1/*.1/
.
If I wanted to exclude directories that correspond to ./dir1/train*.1/
, ./dir2/train*.3/
, ./dir1/dir3/train*.2/
... I can point them all? I tried -path '\*/train*.*' -prune
it but it doesn't work.
+2
a source to share