You can use find
to skip unwanted files, no need to grep
afterwards:
find PATH \( -name '._*' -prune \) -o -type f -iname '*.mov' -execdir echo {} \;
To create a text file with the result, add > path/to/text-file
at the end.
PS: The reason your second command doesn't work is in the pattern used for grep
. You strip out the path name in the find
, so grep -v '^'^\._'
should be used instead.