2

Is it possible in SSH terminal to copy a folder directory into another directory that will share mostly the same folder names/structure but will have unique files.

In a simple example:

If FOLDER1 has APP > CODE > COM > FILE 1

And FOLDER2 has APP > CODE > COM > FILE 2 THEME > BAH > FILE 3

Is it possible to copy app across 'app' to 'app' so that the files will populate the existing folders and new folders that aren't present will be created in the same structure.

Basically I'm trying to install a module that I would normally do through FTP but I only have SSH access to this new server.

Using scp results in ./app: Directory not empty

5

you should try rsync

it is a tool commonly used for backups, so it is able to do just what you want

I think

rsync -avz /some/dir/ user@machine:/some/other/dir

should fit your bill perfectly

5

You can use scp to upload your files to the remote machine into a separate directory, then ssh into the machine and just use cp command to copy the files from one directory to another, with something like.

cp -R /path/to/FOLDER1/* /path/to/FOLDER2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.