cli-tarHow do I use tar, gzip, and SSH together to transfer files?
Using tar, gzip, and SSH together is a great way to securely transfer files between two computers. Here's an example of how to do it:
tar -zcvf file.tar.gz file1 file2
ssh user@hostname
scp file.tar.gz user@hostname:~/
tar -zcvf file.tar.gz file1 file2- This command creates a tar file with the gzip compression format, which includes the filesfile1andfile2.ssh user@hostname- This command establishes an SSH session with the remote host.scp file.tar.gz user@hostname:~/- This command securely copies the filefile.tar.gzto the remote host.
Helpful links
More of Cli Tar
- How can I fix an unexpected end of file error when compressing a file with tar and gzip?
- How do I use gzip, tar, and zip to compress files?
- How do I use the command line to tar and zip a file?
- How do I use the Unix tar zip command?
- How do I use tar gzip with a password?
- How do I use the Unix tar xvf command to extract files?
- How do I use the shell to tar and zip files?
- How do I use a password to compress files with Unix tar?
- How do I remove the absolute path when using the Unix tar command?
- How do I create a tar.zip file in Unix?
See more codes...