How could I copy every regular files (not directories or any other type) from
~/foo that ends in a digit greater or equal than 3 to
~/bar? I tried with the
cp commands, but I couldn't get it to work:
find ~/foo -type f -regex '.*[!012]' -exec cp ~/bar.
some.file12wouldn't be copied because its last digit is 2, and 2 < 3.
somefile603would be copied. 3 = 3.
foo3405would be copied. 4 > 3.
file02.txtwouldn't be copied. It doesn't end in a digit.