Is it possible to pipe the results of find
to a COPY command cp
?
Like this:
find . -iname "*.SomeExt" | cp Destination Directory
Seeking, I always find this kind of formula such as from this post:
find . -name "*.pdf" -type f -exec cp {} ./pdfsfolder \;
This raises some questions:
- Why cant you just use
|
pipe? isn't that what its for? - Why does everyone recommend the
-exec
- How do I know when to use that (exec) over pipe
|
?