FileBarge

FileBarge is a small command-line program for transferring files directly between two machines over TCP. It is useful when netcat is too bare-bones, but setting up FTP, SFTP, or rsync would be unnecessary.

It transfers regular-file contents, can traverse directory inputs, and supports optional compression, checksums, and shared-secret encryption. It deliberately does not transfer directory metadata, empty directories, or symbolic links as links. A symbolic link is followed and its target contents are sent as an ordinary file.

Project goals

Quick start

Build FileBarge with a POSIX shell, make, and Clang:

make build

This builds both .build/filebarge and .build/fileskiff. make test builds both executables and runs the complete test suite. make deploy builds FileSkiff only for Linux targets; other deployment targets contain FileBarge only. The macOS archives include Intel, Apple-Silicon, and universal builds.

On the receiving machine, choose an output directory and start a receiver:

./.build/filebarge receive downloads/

On the sending machine, send a file to the receiver's address:

./.build/filebarge send receiver.example.net report.pdf

FileBarge uses TCP port 8421 by default. The receiver normally exits after a completed session. Add --listen to accept another sender, or --port 0 to let the operating system choose an available port.

Documentation

Building and testing

The compiler must be Clang because the source uses Clang-specific nullability annotations and pragmas.

Security

FileBarge is a direct TCP transfer tool. Do not expose a receiver to untrusted senders. --secret enables encrypted transfers using a shared secret, but the secret may be visible in shell history or process listings. Prefer --secret-file for secrets that must not appear on the command line.

Licensing

FileBarge is free software under the GNU Affero General Public License, version 3 or any later version. See LICENSE.

My other projects

See also my other projects.