Srini's Point of View

My thoughts on technology, food and other fancies…

Argument list too long

Ever tried to copy or move a bunch of files on unix/linux from one location to another and see this error message spit out back at you??

$ cp /var/www/* /var/tmp  
-bash: /bin/cp: Argument list too long

UNIX find to the rescue…

$ find /var/www -type f -name '*' -exec cp {} /var/tmp/. \;

problem solved!

Comments