Skip to main content
deleted 6 characters in body
Source Link

i want to exclude one directory from the find search tree. .aaa is a hidden sub-directory in the current directory. I want to exclude aaa_rc_bbb, xxx_rc_xxx and many more sub-directories containing rc in their names. But it still not ignoring and giving me results containing rc sub-directories. Its as if *rc* wildcard is not working.

find -L /students/projects/myname/ -name ".aaa"aaa -prune -o -path "**/*/class_project/*/*/pikachu/*/*/*rc*/" -prune -o -path "**/*/class_project/*/*/pikachu/*/*/bambi/b‌​ambi.txt"txt | head -n50 | xargs ls.

Also, i want find to search only in this path : */*/class_project/*/*/pikachu/*/*/bambi/b‌​ambi.txt

Please help me. Am i doing anything wrong?

i want to exclude one directory from the find search tree. .aaa is a hidden sub-directory in the current directory. I want to exclude aaa_rc_bbb, xxx_rc_xxx and many more sub-directories containing rc in their names. But it still not ignoring and giving me results containing rc sub-directories. Its as if *rc* wildcard is not working.

find -L /students/projects/myname/ -name ".aaa" -prune -o -path "*/*/class_project/*/*/pikachu/*/*/*rc*/" -prune -o -path "*/*/class_project/*/*/pikachu/*/*/bambi/b‌​ambi.txt" | head -n50 | xargs ls.

Also, i want find to search only in this path : */*/class_project/*/*/pikachu/*/*/bambi/b‌​ambi.txt

Please help me. Am i doing anything wrong?

i want to exclude one directory from the find search tree. .aaa is a hidden sub-directory in the current directory. I want to exclude aaa_rc_bbb, xxx_rc_xxx and many more sub-directories containing rc in their names. But it still not ignoring and giving me results containing rc sub-directories. Its as if *rc* wildcard is not working.

find -L /students/projects/myname/ -name .aaa -prune -o -path */*/class_project/*/*/pikachu/*/*/*rc*/ -prune -o -path */*/class_project/*/*/pikachu/*/*/bambi/b‌​ambi.txt | head -n50 | xargs ls.

Also, i want find to search only in this path : */*/class_project/*/*/pikachu/*/*/bambi/b‌​ambi.txt

Please help me. Am i doing anything wrong?

Source Link

find's prune's -path is not taking wildcards

i want to exclude one directory from the find search tree. .aaa is a hidden sub-directory in the current directory. I want to exclude aaa_rc_bbb, xxx_rc_xxx and many more sub-directories containing rc in their names. But it still not ignoring and giving me results containing rc sub-directories. Its as if *rc* wildcard is not working.

find -L /students/projects/myname/ -name ".aaa" -prune -o -path "*/*/class_project/*/*/pikachu/*/*/*rc*/" -prune -o -path "*/*/class_project/*/*/pikachu/*/*/bambi/b‌​ambi.txt" | head -n50 | xargs ls.

Also, i want find to search only in this path : */*/class_project/*/*/pikachu/*/*/bambi/b‌​ambi.txt

Please help me. Am i doing anything wrong?