Table of Contents
This tip is about the how to Use Transfer.sh to Upload and Share Files From Terminal. So read this free guide, How to Use Transfer.sh to Upload and Share Files From Terminal. If you have query related to same article you may contact us.
File sharing provides access to digital media such as computer programs and multimedia files such as music, photos, videos, etc. It allows users to share, read, write, copy and modify similar files. Linux has some file sharing options including: Samba file share, NFS file share, SSH Linux file share, Transfer.sh file share, etc. We will discuss how Transfer.sh file share is used on Linux systems. Transfers.sh is a free accommodation service that allows you to upload files up up to a maximum size of 10GB without an account. These files are saved and available for 14 days, after which they disappear.
Transfer.sh makes it possible to encrypt files with GPG before sending them. You can also limit the maximum number of downloads and the number of days the file is available for sharing. Transfer.sh has simplified the file sharing process as files can be uploaded simply by running a shell function.
Upload files with Transfer.sh
All you have to do is run the following command to share the files:
When the upload is complete, the service returns the unique download link for the file to us, like the one seen in the previous line. You can pass this URL on to anyone who wants to download and use this file.
It is also possible to upload files using ‘wget’.
wget –method PUT –body-file = /home/sapoclay/Office/ENTREUNOS.pdf https://transfer.sh/ENTREUNOSYCEROS.pdf -O – -nv
This utility will allow us to load multiple files at once. For this, we will only have to execute an order with the same structure as the following:
curl -i -F filedata = @ /home/sapoclay/Office/bash_tips.pdf -F filedata = @ /home/sapoclay/Office/bash_tips_2.pdf https://transfer.sh/
file download
To download the file, run it vastly using a command like the following. In it we indicate the URL for download and the name of the file that will be created on our computer:
curl https://transfer.sh/bZNd9/ENTREUNOSYCEROS.pdf -o entreunosyceros.pdf
Alternatively, we can preview the download and run it in our browser. Just place the download link in the address bar and click the “download” button button to download the shared file.
Encrypt and upload files
For more security, this app will allow us to encrypt and upload the files. To encrypt and upload files, we’ll run something like the following in the terminal:
We will be asked to enter a long password twice. The app will provide us with the download link of the encrypted file. Which will look something like the following:
Decrypt and download files
To decrypt and download the previous encrypted file, we just have to run:
curl https://transfer.sh/140GNQ/archivo.txt|gpg -o-> /home/sapoclay/Office/entreunosyceros.txt
add alias
If we plan to use this service frequently, we might consider adding aliases to the .bashrc or .zshrc files to make this command even easier to use.
If you use the BASH shell, edit the ~ / .bashrc file:
sudo vi ~ / .bashrc
Add the following lines to the final of the file.
Save and close the file. Then run the following command for the saved changes to take effect.
You will now be able to upload and download files as shown below.
The latter, as you can see, will make using this useful terminal program much easier.
Final note
I hope you like the guide How to Use Transfer.sh to Upload and Share Files From Terminal. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.