How do I copy directories in DirectAdmin

mike_phi

New member
Joined
May 12, 2006
Messages
1
Hi there, I finally manged to upload my website, I how ever have uploaded it with an extra directory depth, I would like to copy all files and directories contained in a sub directory to the public_html.

eg
current problematic situation

<domains>
|
<mydomain name>
|
<public_html>
|
<unnecesary sub directory>
|
<mysite index page and necesarry directories>


desired situation

<domains>
|
<mydomain name>
|
<public_html>
|
<mysite index page and necesarry directories>

how can I copy all the "<mysite index page and necesarry directories>
" up one directory.




measures
I have tried using the compresion supplied with directadmin but when I attempt to extract the archive it creates the same directory path with the repeated directories concatenated to the origional directory

e.g.
Step 1
I archive this

<domains>
|
<mydomain name>
|
<public_html>
|
<unnecesary sub directory>
|
<target archive directory> (archive file.gz.tar)

Step 2
I then copy the archive to

<domains>
|
<mydomain name>
|
<public_html> (archive file.gz.tar)

step3

I then extract the archive in public_html directory

but the result is


<domains>
|
<mydomain name>
|
< public_html>
|
<domains>
|
<mydomain name>
|
< public_html>
|
<unnecesary sub directory>
|
<target archive directory extracted here>


I would like it to be

<domains>
|
<mydomain name>
|
< public_html>
|
<target archive directory extracted here>

Hence getting rid of my problem of having the "<unnecesary sub directory>" as listed in the first diagram

Another question is there any other method I can just copy or move these files and directories trapped in this sub directory to the desired location, I was considering ftp again but that took too long in the first place and is not a elagant efficient solution please please help

cheers Mic
 
I don't know if you can do it from the filemanager or not.

From a shell login, first CD to the directory above the subdirectory, then:
Code:
$ mv subdirectoryname/* .
This will move everything; not copy it.

Then you can remove the empty subdirectory:
Code:
$ rmdir subdirectoryname
The rmdir will fail if there's anything left in the subdirectory.

Jeff
 
Back
Top