Ad
How Can You Recursively Copy All Of The *.foo Files In Src To Target Using Cp And/or Find?
cp -v -ur path/to/jsps/ /dest/path/
The above command copies all of the files that have been updated from the source directory to the destination, preserving the directory structure.
What I can't figure out is how to copy only *.someExtention files. I know that you can use something like:
find -f -name *.jsp -exec some awesome commands {}
But I don't know how to do it (and I don't have time to read the info pages in detail).
All help is greatly appreciated.
Thanks, LES
Ad
Answer
If you want to use find / cp then the following should do the trick:
find -f -name *.jsp -exec cp --parents {} /dest/path \;
but rsync is probably the better tool.
Ad
source: stackoverflow.com
Related Questions
- → After copying Laravel from one PC to another it shows a strange error from helpers.php
- → Gulp.src Glob Won't Copy .csscomb.json File
- → react-router: Warning: Failed Context Types: Required context `router` was not specified
- → (Javascript) execCommand('copy') copies text but adds extra white space to value
- → jquery not triggering change when textbox changes occurs from copy-paste with mouseclick
- → Laravel - Need to access a global variable set in BaseController from within a model
- → How can I use webpack to copy files to the distribution folder?
- → Display the selected/active link in a div using jQuery
- → afterSave() gives error trying to get property of non-object in octoberCMS
- → The value gets copied to the textarea but disappears after a moment
- → React stops rendering with child element
- → Getting multiple 404 for Copy_of_Facebook_Ad_Untitled_Design_1.png
- → Liferay and Google Tag Manager implementation
Ad