4

-exec cmd in ksh script

view full story
linux-howto

http://www.unix.com – Hi, I discovered the following single-line script works very well to cp a large number of files from a source directory to a destination directory while avoiding the "argument list too large" error: # cpmany - copy large number of files # Takes two parameters - source dir, destination dir # Copies ALL regular files from source dir to destination dir # Does not traverse subdirectories in source # Does not cp hidden files # find $1 -maxdepth 1 -type f -name '*' -exec cp -v {} $2 \; I'm not fluent in the ksh, so I'm hoping someone who is can explain in detail the operation of this (HowTos)