On Thu, Oct 29, 2015 at 11:23 AM, Gustav Degreef
On 10/29/2015 04:20 AM, Andrei Borzenkov wrote:
28.10.2015 23:59, Gustav Degreef пишет:
On 10/28/2015 07:05 PM, Andrei Borzenkov wrote:
On Wed, Oct 28, 2015 at 10:01 PM, Gustav Degreef
wrote: Hello listers,
I need to pipe the names and locations of files I find by:
find /home/username/folder -type f -name "*.doc"
to:
cp *.doc /home/username/doclist/
The subdirectory /folder contains more than 28,000 files and more than 2,600 subfolders, so it can notbu be easily done by routine find and cp.
find . | cpio -pmdu /target/dir
find /home/dir -type f -name "*.doc" | cpio -pmdu /home/target/
That is what I ran. It does not work. I got 1,800+ files BUT I also got 800+ subfolders which obstruct the end result. Thanks, but something is still missing in the command. Thanks. Gustav.
So you want to copy everything in a single directory? Yes, exactly.
find . -print0 | xargs --null cp -t /path/to/target/dir see other xargs options how to control max number of arguments and parallelism. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org