If you prefer doing things from the command line, transfer.sh (no, that's not a script, it's a website) is for you. Using it, you can easily share a file from the command line, without installing anything. Well, cURL or Wget are required, but you probably already have them installed.





The service is free, allows uploading files up to 10 GB in size, and it stores the files for 14 days. In my test, it was also very fast.

If you want to use transfer.sh with your own server, the code is available on GitHub





To use transfer.sh, you'll need to install cURL. In Debian-based Linux distributions (Ubuntu, Linux Mint, etc.), use the following command to install it:

sudo apt install curl

To upload a file to Transfer.sh and get a shareable URL, use the following command:

curl --upload-file ./myfile.txt https://transfer.sh/myfile.txt

To make it even easier, you can use a Bash (should also work with Zsh) alias. To do this, open ~/.bashrc with a text editor, and paste this at the end of the file:

transfer() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:

echo transfer /tmp/test.md

cat /tmp/test.md | transfer test.md"; return 1; fi tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; }

. ~/.bashrc

transfer myfile.txt







For more examples, including using Wget instead of cURL, uploading multiple files, encrypting the files before uploading them, upload files to be scanned for malware or viruses using Clamav or VirusTotal, and more, see the Here's a screenshot too (screenshots of commands may be useless, but this article needs a preview on Google+ and Facebook):For, including using Wget instead of cURL, uploading multiple files, encrypting the files before uploading them, upload files to be scanned for malware or viruses using Clamav or VirusTotal, and more, see the transfer.sh website.

There are quite a few similar services, but for smaller files, like chunk.io, up.depado.eu, etc.

Replacing "myfile.txt" with the file you want to share.The shared file can be previewed in the browser, and it can be directly downloaded via the command line (e.g. using "curl -O https://transfer.sh/4ityD/myfile.txt").Then save the file and run the command below to source thefile:(there's a dot, then a space beforeThat's it. You can now simply use "transfer" to upload a file, like so: