Friday, May 10, 2024
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 17726  / 3 Years ago, wed, july 14, 2021, 7:27:09

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


More From » command-line

 Answers
4

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




[#36337] Friday, July 16, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
whipstder

Total Points: 189
Total Questions: 110
Total Answers: 99

Location: Uzbekistan
Member since Sat, Feb 27, 2021
3 Years ago
whipstder questions
Wed, Nov 9, 22, 09:45, 2 Years ago
Tue, Sep 14, 21, 10:54, 3 Years ago
Sun, May 28, 23, 03:52, 1 Year ago
Sat, Jul 17, 21, 07:10, 3 Years ago
;