So today I encountered one of my PHP files was outdated so I've got to overwrite the phpthumb directory on the entire server.Multiple websites use this folder on multiple unknown locations, so how can I overwrite all these directories from 1 source path? (ie: /home/test/testuser/phpthumb/ to /home/*/*/phpthumb/)
How-to overwrite directory on multiple places with 1 source directory
command line;copy;mv
This should work:echo /home/*/*/phpthumb | xargs -t -n 1 cp -r /home/test/testuser/phpthumb/*You have to work with xargs. Unfortunately cp cannot copy to multiple target. cp can handle multiple sources.Explanation:echo /home/*/*/phpthumb: lists all phpthumb directoriesxargs -t -n 1: xargs should call cp for every line separatelycp -r /home/test/testuser/phpthumb/* the command xargs should call. Note the target directory will be appended at the end by xargs.