Tips to Use Transfer.sh to Upload and Share Files From Terminal

Tips to Use Transfer.sh to Upload and Share Files From Terminal

Hello Geeky, so today we are focusing on How to Use Transfer.sh to Upload and Share Files From Terminal. So please read this tutorial carefully so you may comprehend it in a better helpful way.

Guide: How to Use Transfer.sh to Upload and Share Files From Terminal

File sharing provides access to digital media such as computer programs and multimedia files such as music, pictures, videos, etc. It allows users to share, read, write, copy, and replicate files do. Linux has several file sharing options including: Samba file sharing, NFS file sharing, SSH Linux file sharing, Transfer.sh file sharing, etc. We will discuss how to use Transfer.sh file sharing in Linux programs. Transfers.sh is a free hosting service that allows you to upload files up to a maximum of 10 GB without an account. These files are stored and stored for 14 days, after which they are deleted.

Transfer.sh makes it possible to encrypt files with GPG before uploading them. You can also limit the maximum number of records and the number of days the file is available for sharing. Transfer.sh has made the file sharing process easier, as files can be easily downloaded by running a shell job.

Upload files with Transfer.sh

All you have to do is run the following command to share the files:

  • curl –upload-file ENTREUNOS.pdf https://transfer.sh/ENTREUNOS.pdf In this example, ENTREUNOS.pdf is on my desktop.
  • https://transfer.sh/bZNd9/ENTREUNOSYCEROS.pdf

When the upload is complete, the function restores the unique record link for the file, as seen in the previous line. You can send this URL to anyone who wants to download and use this file.

It is also possible to upload files using the ‘wget’.

wget – PUT –body-file = /home/sapoclay/Escritorio/ENTREUNOS.pdf https://transfer.sh/ENTREUNOSYCEROS.pdf -O – -nv

This utility will allow us to upload multiple files at once. To do this we will have to run the command only with the same settings as follows:

curl -i -F filed = = /home/sapoclay/Escritorio/bash_tips.pdf -F filedata = @ /home/sapoclay/Escritorio/bash_tips_2.pdf https://transfer.sh/

Record files

To download the file, work diligently using the command as follows. In it we refer to the URL to record and the file name that will be created on our computer:

curl https://transfer.sh/bZNd9/ENTREUNOSYCEROS.pdf -o entreunosyceros.pdf

Alternatively, we can preview the record and make it from our web browser. Just insert the download link into the address bar and click “Download” button to record a shared file.

Encrypt and upload files

For added security this application will allow us to encrypt and export the files. To encrypt and export files, we will work something like this in the terminal:

  • cats /home/sapoclay/Escritorio/archivo.txt|gpg -ac -o- | curl -X PUT -upload-file “-” https://transfer.sh/archivo.txt

You will be asked to enter a password twice. The application gives us the download link of the encrypted file. Which will be something like the following:

  • https://transfer.sh/140GNQ/archivo.txt

Decrypt and record files

To download and retrieve an already encrypted file, we will only have to work:

curl https://transfer.sh/140GNQ/archivo.txt|gpg -o-> /home/sapoclay/Escritorio/entreunosyceros.txt

Add an alias

If we plan to use this function frequently, we might consider adding aliases to .bashrc or .zshrc files to make this command even easier to use.

If you use the BASH shell, edit the file ~ / .bashrc:

sudo vi ~ / .bashrc

Add these lines to the end of the file.

  • transfer () {if [ $# -eq 0 ]; then echo -e “No specific arguments. Using: necho transfer /tmp/test.mdncat /tmp/test.md | transfer test.md ”; on 1; fi
  • tmpfile = $ (mktemp -t transferXXX); if tty -s; then basefile = $ (namename “$ 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; cats $ tmpfile; rm -f $ tmpfile; }

Save and delete the file. Then execute the next command to let the saved changes take effect.

  • source ~ / .bashrc

Now, you will be able to upload and download the files as shown below.

  • transfer archivo.txt

The latter, as you can see, will make using a very useful terminal system much easier.

Faq

Guide about How to Use Transfer.sh to Upload and Share Files From Terminal


In this guide, we told you about the How to Use Transfer.sh to Upload and Share Files From Terminal; please read all steps above so that you understand How to Use Transfer.sh to Upload and Share Files From Terminal in case if you need any assistance from us, then contact us.

How this tutorial or guide assisting you?


So in this guide, we discuss the How to Use Transfer.sh to Upload and Share Files From Terminal, which undoubtedly benefits you.



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 queries regards this article/tutorial you may ask us. Also, please share your love by sharing this article with your friends and family.

Trickbugs: Get the latest Trick and Tips
Logo
Enable registration in settings - general