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 filesfile1
andfile2
.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.gz
to the remote host.
Helpful links
More of Cli Tar
- How do I use the Unix tar zip command?
- How do I use the command line to tar and zip files?
- How do I use gzip, tar, and zip to compress files?
- How do I use the shell to tar and zip files?
- How can I use tar commands to zip a file?
- How do I create a tar.zip file in Unix?
- How do I use the command line to tar and zip a file?
- How do I use the command line to tar and zip a file?
- How do I use the command line to tar and zip a file?
- How do I use the command line to tar and distribute files?
See more codes...