Caution
I am very new to bash scripting, and as a result this script will have tons of bugs, possibly even ones leading to data loss! I am not responsible for any damage caused by this script.
This bash script provides a proof of concept method of transferring files and folders over terminals via the clipboard. For example, to transfer files over to a locked down machine with no internet access via ssh.
It started off slow due to network traffic
Download the latest transfer.bash script from the repo, and run with bash transfer.bash
Note
Use middleclick paste, not Ctrl + Shift + V
If you are on X11, then set the clipboard copy command to xclip with -c xclip, or clip for Windows.
usage: transfer.bash [command] [-c <clip tool>] [-t <compression>] [file]
Args:
-t select compression type, e.g., `-t gz`
-c set clipboard copy method. Default: `wl-copy -p`
Commands:
get-compression-method, gcm Determine the optimal compression method supported on the target system
bench Start a transfer speed benchmark (cool)
Examples:
transfer.bash gcm Get optimal compression method
transfer.bash -t gzip -c xclip file.txt Transfer file with the gzip compression method
- Ability to choose compression strength
- Calculate time remaining from the time for each packet to be transferred
Any PRs would be appreciated (this script could do with some improvements)
And learning is fun!


