Using sz/rz for Uploads and Downloads on Linux

Sep 24, 2017 · 1 min read · 138 Words · -Views -Comments

In daily development, we often need to upload files to a server or download files from it. FTP requires setting up an FTP server and configuring the service. Using sz/rz enables simple upload and download operations.

Installation

# On macOS
brew install lrzsz

## On Linux machines
yum install lrzsz

## FreeBSD
pkg install lrzsz

## Debian
apt install -y lszrz   

Usage

sz usage: download

  • Download a single file: # sz filename
  • Download multiple files: # sz filename1 filename2
  • Download all files under the dir directory, excluding subfolders: # sz dir/*

rz usage: upload

  • Just type the rz command # rz

  • Force overwrite the source file # rz -y

iTerm2 setup on macOS

# Create two files in the /usr/loal/bin directory
cd /usr/local/bin
wget https://raw.githubusercontent.com/RobberPhex/iterm2-zmodem/master/iterm2-recv-zmodem.sh
wget https://raw.githubusercontent.com/RobberPhex/iterm2-zmodem/master/iterm2-send-zmodem.sh

# Grant execute permissions to these two files
chmod 777 /usr/local/bin/iterm2-*
Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover