Untar a Tarball to a Remote Directory Gregg May 8, 2023 Sometimes you may need to copy an entire directory structure to another system using the command line. Here is a quick way to do it using the tar command: cat myfile.tgz | ssh user@host “tar xzf - -C /some/dir” Cli Motd Tar