The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Copy Single file to multiple directories

Discussion in 'General Discussion' started by crazyaboutlinux, Mar 4, 2011.

  1. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    there over 50 sudomains on example.in which we created using Main >> Account Functions >> Create a New Account

    now i want to copy a file "file1.txt" in public_html directory of all subdomains
    e.g

    test.example.in
    aayush.example.in
    shreya.example.in
    utkarsh.example.in
    tathyansh.example.in


    the "file1.txt" is located in example.in/public_html/file1.txt

    how do i copy "file1.txt" in public_html directory of all above mentioned subdomains ??
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Are all 50 subdomains the only accounts on the machine or there are other accounts on the machine besides those? The response is going to depend on whether you can basically copy this file into every account on the machine with a public_html folder or instead you need to get a list of the subdomain account usernames and pull the paths from that list.
     
  3. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    yes all 50 subdomains the only accounts on the same machine where i want to copy "file1.txt" the "file1.txt" is located in example.in/public_html/file1.txt
    from /home/example/public_html/file1.txt TO following subdomains

    test.example.in /home/test/public_html/
    aayush.example.in /home/aayush/public_html/
    shreya.example.in /home/shreya/public_html/
    utkarsh.example.in /home/utkarsh/public_html/
    tathyansh.example.in /home/tathyansh/public_html/

    is it possible to copy that file to all subdomain which i mentioned at one go ??
     
Loading...

Share This Page