Skip to main content
added 92 characters in body
Source Link
Satō Katsura
  • 13.7k
  • 2
  • 34
  • 52

Use find:

find folder0 -type f -exec cp {} targetfolder \;

With GNU coreutils you can do it more efficiently:

find folder0 -type f -exec cp -t targetfolder {} +

The former version runs cp for each file copied, while the latter runs cp only once.

Use find:

find folder0 -type f -exec cp {} targetfolder \;

With GNU coreutils you can do it more efficiently:

find folder0 -type f -exec cp -t targetfolder {} +

Use find:

find folder0 -type f -exec cp {} targetfolder \;

With GNU coreutils you can do it more efficiently:

find folder0 -type f -exec cp -t targetfolder {} +

The former version runs cp for each file copied, while the latter runs cp only once.

Source Link
Satō Katsura
  • 13.7k
  • 2
  • 34
  • 52

Use find:

find folder0 -type f -exec cp {} targetfolder \;

With GNU coreutils you can do it more efficiently:

find folder0 -type f -exec cp -t targetfolder {} +