递归地将文件添加到所有目录

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了递归地将文件添加到所有目录相关的知识,希望对你有一定的参考价值。

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

以上是关于递归地将文件添加到所有目录的主要内容,如果未能解决你的问题,请参考以下文章