Posted By

dan_hoerr on 03/05/11


Tagged

file copy directory timesaver


Versions (?)

add file to all directories recursively


 / Published in: Bash
 

currently formatted for use on mediatemple server. replace file path with absolute path of resources.

  1. #!/bin/bash
  2.  
  3. find /home/xxxxx/domains/mydomain.net/html/stuff/test -type d -print0 | xargs -0 -i{} cp /home/xxxxx/domains/mydomain.net/html/stuff/index.php {}/index.php
  4.  
  5. exit 0

Report this snippet  

You need to login to post a comment.