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 do I use the Unix tar zip command?
- How do I use the command line to tar and zip files?
- How do I use the shell to tar and zip files?
- How do I use the Unix tar xzvf command?
- 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 can I use the CLI tar yarn command to compress files?
- How do I compress a file using gzip and tar.xz?
- How do I use the tar command line in Windows 10?
- How do I use the command line to tar and distribute files?
See more codes...