Tag: scp

Linux

Move directory to another server

* Compress directory tar cvzf myfolder.tar.gz myfolder/tar cvzf myfolder.tar.gz myfolder/ * Copy directory scp myfolder.tar.gz [username]@[ip_address_or_hostname]:/home/[username]/myfolder.tar.gzscp myfolder.tar.gz [username]@[ip_address_or_hostname]:/home/[username]/myfolder.tar.gz * Extract directory contents on new server tar -xvzf myfolder.tar.gz -C /path/to/myfoldertar -xvzf myfolder.tar.gz -C /path/to/myfolder

Linux

Transferring files with SCP

Copy files between systems through ssh using scp command line tool. Upload file scp local_filename username@hostname:/path/to/filenamescp local_filename username@hostname:/path/to/filename Download file scp username@hostname:/path/to/filename local_filenamescp username@hostname:/path/to/filename local_filename   Upload directory scp -r local_directoryname username@hostname:/path/to/directorynamescp -r local_directoryname username@hostname:/path/to/directoryname Download directory scp -r username@hostname:/path/to/directoryname local_directorynamescp -r username@hostname:/path/to/directoryname local_directoryname