Skip to the content.

Trzsz Document

trzsz ( trz / tsz ) is a simple file transfer tools, similar to lrzsz ( rz / sz ), and compatible with tmux.

GitHub: https://github.com/trzsz/trzsz

MIT License PyPI trzsz 中文网站

Why?

Considering laptop -> hostA -> hostB -> docker -> tmux, using scp or sftp is inconvenience.

In this case, lrzsz ( rz / sz ) is convenient to use, but unfortunately it’s not compatible with tmux.

tmux is not going to support rz / sz ( 906, 1439 ), and creating a new tools is much easier than patching tmux.

Advantage

Installation

On the server

  Can be installed without sudo, just add the installation path ( e.g. ~/.local/bin ) to the PATH environment.

Supported Terminals

  Does your terminal supports trzsz as well? Please let me know. I would love to have it on the list.

Trzsz Manual

trz upload files to the remote server

  usage: trz [-h] [-v] [-q] [-y] [-b] [-e] [-d] [-B N] [-t N] [path]

  Receive file(s), similar to rz and compatible with tmux.

  positional arguments:
    path               path to save file(s). (default: current directory)

  optional arguments:
    -h, --help         show this help message and exit
    -v, --version      show program's version number and exit
    -q, --quiet        quiet (hide progress bar)
    -y, --overwrite    yes, overwrite existing file(s)
    -b, --binary       binary transfer mode, faster for binary files
    -e, --escape       escape all known control characters
    -d, --directory    transfer directories and files
    -B N, --bufsize N  max buffer chunk size (1K<=N<=1G). (default: 10M)
    -t N, --timeout N  timeout ( N seconds ) for each buffer chunk.
                       N <= 0 means never timeout. (default: 20)

tsz download files from the remote server

  usage: tsz [-h] [-v] [-q] [-y] [-b] [-e] [-d] [-B N] [-t N] file [file ...]

  Send file(s), similar to sz and compatible with tmux.

  positional arguments:
    file               file(s) to be sent

  optional arguments:
    -h, --help         show this help message and exit
    -v, --version      show program's version number and exit
    -q, --quiet        quiet (hide progress bar)
    -y, --overwrite    yes, overwrite existing file(s)
    -b, --binary       binary transfer mode, faster for binary files
    -e, --escape       escape all known control characters
    -d, --directory    transfer directories and files
    -B N, --bufsize N  max buffer chunk size (1K<=N<=1G). (default: 10M)
    -t N, --timeout N  timeout ( N seconds ) for each buffer chunk.
                       N <= 0 means never timeout. (default: 20)

Trouble shooting

Screenshot

Using trzsz in iTerm2 with text progress bar

using trzsz in iTerm2 with text progress bar

Using trzsz in iTerm2 with zenity progress bar

using trzsz in iTerm2 with zenity progress bar

Using trzsz in tabby with tabby-trzsz plugin

using trzsz in tabby with tabby-trzsz plugin

Contact

Feel free to email the author lonnywong@qq.com. Welcome to join the QQ group: 318578930.

Want to buy the author a drink🍺?

sponsor wechat qrcode sponsor alipay qrcode