linux - Copy and replace file recursively -
i try find way copy , replace files recursively.
example:
folder /home/test/
1/test.jpg 1/sth_other.png 2/test.jpg 2/sth_other.jpg 3/test.jpg 4/test.jpg
you can see in folder /home/test have more , more folders (1,2,3,4) file name 'test.jpg'.
i have file /home/test.jpg
question:
how replace file 'test.jpg' in 1/2/3/4(folders) file /home/test.jpg ?
with find, do:
find /where -name test.jpg -type f -exec cp -i /home/test.jpg {} \;
Comments
Post a Comment