bash: /bin/cp: Argument list too long

bash: /bin/cp: Argument list too long

If you get the above message it means you have too many files to copy and cp doesn’t handle multiple files well.

The way of getting around these errors is to run your command in a loop:

for file in /from_directory/*; do cp -R "$file" /to_directory/; done