moving files simple question

Discussion in 'Installation/Configuration' started by unsichtbare, Dec 23, 2007.

  1. unsichtbare

    unsichtbare Member HowtoForge Supporter

    I feel silly for asking this, but how would I move all the files and folders from one folder into another folder?

    I am migrating from a Fedora/Plesk server to a Ubuntu (W/ISP Config) and the public html folders are called httpdocs and web respectively. I have a .tgz file which, when untared and unzipped on the new server will create httpdocs. I need to move the contents of httpdocs (files and folders) into web?

    -J
     
  2. wpwood3

    wpwood3 New Member

    Try this

    Go to the httpdocs folder on your Fedora/Plesk box and type this:
    Code:
     
    tar czvf mydocs.tgz *
    
    That will create a compressed tar archive containing all of your files that are in httpdocs

    Copy mydocs.tgz over to the web folder on your Ubuntu box.
    Go to the web folder and type the following to extract your files:
    Code:
     
    tar xzvf mydocs.tgz
    
     
  3. wpwood3

    wpwood3 New Member

    If you already have extracted httpdocs

    I just reread your question...

    It sounds like you have already created httpdocs.tgz.
    If you copy that file into the web folder and unzip it you will have a httpdocs folder inside of the web folder.
    Something like
    /var/www/web1/web/httpdocs
    Go to the httpdocs folder and do the following to move the contents to the web folder:
    Code:
     
    mv * ../
    
    Then you can delete the httpdocs folder

    ----------------------------------------------

    If you have already extracted httpdocs inside web1 and not web then you have to do something a little different. Here are 2 ways to do it:

    1) You could simply delete the web folder and rename the httpdocs folder to web.

    OR

    2) Go to the httpdocs folder and type the following:
    Code:
    mv * /var/www/web1/web
    Be sure to change "web1" above to whatever is correct for your situation.
     
    Last edited: Dec 23, 2007
  4. unsichtbare

    unsichtbare Member HowtoForge Supporter

    Exactally the info I was looking for, thanks! *, too simple!

    -J
     

Share This Page