Skip to content

Instantly share code, notes, and snippets.

@alifeee
Last active January 10, 2024 00:39
Show Gist options
  • Save alifeee/4a6cead6cd3e79a6620100ea00de5e42 to your computer and use it in GitHub Desktop.
Save alifeee/4a6cead6cd3e79a6620100ea00de5e42 to your computer and use it in GitHub Desktop.
transfer folders over scp

Transfer Folders over SCP

With tar + zip

Commands

zip + tar

tar -cvzf <nameoftar>.tar.gz <nameoffolder>

Transfer over scp

scp ./<nameoftar>.tar.gz <user>@<server>:<filelocation>

untar + unzip (on remote)

tar -xvzf <nameoftar>.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment