How to copy all files inside /directory/subfolder to /directory using SSH?
/directory/subfolder
/directory
PS. I donβt go from 1 server to another, Iβm just trying to copy files to a subfolder to update the site ...
I'm not too familiar with SSH, although I used WinSCP to do what you requested using an SSH connection. It was pretty easy, although I didn't have to deal with server-side settings.
scp -r /directory/subfolder/* user@host :/directory
cp -a <from-path> <to-path>
may look like
cp -a /var/www/site.com/dir/ /var/www/newsite.com/dir/
scp -r user1@from-server :/dir1 user2@to-server :/dir2 scp -r local-directory user2@to-server :/dir scp -r user1@from-server :/dir local-directory
I believe that you are looking for sftp and, in particular, the put command. Below is the sftp documentation .
sftp
put
Depending on your needs and the underlying OS. If you are on a box with X / windows and are trying to copy files, you can use FileZilla, WinSCP and upload files via sftp. Another nice method is to use ExpanDrive, MacFusion, WebDrive or WebDrive for MAC and just mount the external directory as a local drive. If you are only interested in a console solution, you might want to take a look at scp.
PULL: # ssh target_address cat remotefile > localfile # ssh target_address dd if=remotefile | dd of=localfile # ssh target_address cat "<" remotefile >localfile # ssh target_address cat "<" remotefile.gz | gunzip >localfile
Source: https://habr.com/ru/post/1286655/More articles:Google App Engine cannot find gdata module - pythonIsolatedStorageException: Unable to create store directory - c #Delphi 2009 - Can an interface property cause a memory leak? - memory-leaksHow do you define a constant in a PLT diagram? - schemeWim - strange behavior - vimMS Access linked to SQL server views - sqlRegular expression to match up to ten digits - regexIntercepting queries and rewriting in SQL Server 2005 - sql-serverhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1286659/which-static-analysis-tool-for-java-is-easiest-to-extend&usg=ALkJrhgCJ8odj2TECmeANGBPEPJt-7LY-QDelphi: TImage.Create causes an access violation - arraysAll Articles