Argument list too long for mv,cp,rm commands (Bash)

The reason this occurs is because bash actually expands the asterisk to every matching file, producing a very long command line. Solution
find Path/to/source-folder/  -name '*.*' -exec mv {} Path/to/destination-folder/ \;

Related Articles

If you like our content, please consider buying me a coffee.

Thank you for your support!

Buy me a coffeeBuy me a coffee

Leave a reply:

Your email address will not be published.

Site Footer