Transfer Files from the Command Line with transfer.sh

Productivity Sauce
Need to share a file without leaving the convenience of the terminal? The transfer.sh service got you covered. Using the good old curl tool, you can share and download shared files using a handful of simple commands. To upload the foo.txt file, run the curl --upload-file ./foo.txt https://transfer.sh/foo.txt command. When the upload is completed, the service returns the download link which you can pass to other users. Downloading the share file is as easy as running the curl https://transfer.sh/SbhMe/foo.txt command (where SbhMe is a unique identifier of the shared file). All shared files automatically expire after two weeks, so there is no need to worry about removing them manually.
If you plan to use the service on a regular basis, add the following function to the ~/.bashrc file:
transfer() { curl --upload-file $1 https://transfer.sh/$(basename $1); } alias transfer=transfer
This way, you can share files using the transfer [FILE] command (e.g., transfer foo.jpg). The project's website provides a few other commands that can be used to share multiple files, combine downloads as tar archives, encrypt files before upload, etc.
comments powered by DisqusIssue 272/2023
Buy this issue as a PDF
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
News
-
An All-Snap Version of Ubuntu is In The Works
Along with the standard deb version of the open-source operating system, Canonical will release an-all snap version.
-
Mageia 9 Beta 2 Ready for Testing
The latest beta of the popular Mageia distribution now includes the latest kernel and plenty of updated applications.
-
KDE Plasma 6 Looks to Bring Basic HDR Support
The KWin piece of KDE Plasma now has HDR support and color management geared for the 6.0 release.
-
Bodhi Linux 7.0 Beta Ready for Testing
The latest iteration of the Bohdi Linux distribution is now available for those who want to experience what's in store and for testing purposes.
-
Changes Coming to Ubuntu PPA Usage
The way you manage Personal Package Archives will be changing with the release of Ubuntu 23.10.
-
AlmaLinux 9.2 Now Available for Download
AlmaLinux has been released and provides a free alternative to upstream Red Hat Enterprise Linux.
-
An Immutable Version of Fedora Is Under Consideration
For anyone who's a fan of using immutable versions of Linux, the Fedora team is currently considering adding a new spin called Fedora Onyx.
-
New Release of Br OS Includes ChatGPT Integration
Br OS 23.04 is now available and is geared specifically toward web content creation.
-
Command-Line Only Peropesis 2.1 Available Now
The latest iteration of Peropesis has been released with plenty of updates and introduces new software development tools.
-
TUXEDO Computers Announces InfinityBook Pro 14
With the new generation of their popular InfinityBook Pro 14, TUXEDO upgrades its ultra-mobile, powerful business laptop with some impressive specs.