Switch.sh – Straightforward File Sharing from Linux Commandline
Switch.sh is a straightforward, straightforward and quick service for file sharing from the command-line. It lets you add as much as 10GB of information and information are saved for 14 days, at no cost.
You may maximize quantity of downloads and it additionally helps encryption for safety. It helps the native file system (native); along with s3 (Amazon S3), and gdrive (Google Drive) cloud storage providers.
Switch.sh – Straightforward File Sharing in Linux Terminal
It’s designed for use with the Linux shell. As well as, you possibly can preview your information within the browser. On this article, we’ll present the way to use switch.sh in Linux.
Add a Single File
To add a file, you should utilize the curl program with the –upload-file choice as proven.
$ curl –upload-file ./tecmint.txt https://switch.sh/tecmint.txt
Obtain a File
To obtain your file, a buddy or colleague can run the next command.
$ curl https://switch.sh/Vq3Kg/tecmint.txt -o tecmint.txt
Add A number of Information
You may add a number of information without delay, for instance:
$ curl -i -F [email protected]/path/to/tecmint.txt -F [email protected]/path/to/usernames.txt https://switch.sh/
Encrypt Information Earlier than Switch
To encrypt your information earlier than the switch, use the next command (you should have the gpg instrument put in on the system). You can be prompted to enter a password to encrypt the file.
$ cat usernames.txt | gpg -ac -o- | curl -X PUT –upload-file “-” https://switch.sh/usernames.txt
To obtain and decrypt the above file, use the next command:
$ curl https://switch.sh/11Rnw5/usernames.txt | gpg -o- > ./usernames.txt
Use Wget Device
Switch.sh additionally helps the wget instrument. To add a file, run.
$ wget –method PUT –body-file=./tecmint.txt https://switch.sh/tecmint.txt -O –nv
Create Alias Command
To make use of the quick switch command, add an alias to your .bashrc or .zshrc startup file.
$ vim ~/.bashrc
OR
$ vim ~/.zshrc
Then add the strains under in it (you possibly can solely select one instrument, both curl or wget).
##utilizing curl
switch() tee /dev/null;
alias switch=switch
##utilizing wget
switch()
wget -t 1 -qO – –method=PUT –body-file=”$1″ –header=”Content material-Kind: $(file -b –mime-type $1)” https://switch.sh/$(basename $1);
alias switch=switch
Save the modifications and shut the file. Then supply it to use the modifications.
$ supply ~/.bashrc
OR
$ supply ~/.zshrc
Any further, you add a file utilizing the switch command as proven.
$ switch customers.checklist.gz
To setup your personal sharing server occasion, obtain this system code from the Github repository.
Yow will discover extra data and pattern use instances within the undertaking homepage: https://switch.sh/
Switch.sh is a straightforward, straightforward and quick service for file sharing from the command-line. Share your ideas about it with us by way of the suggestions type under. You can too inform us about comparable providers that you’ve got come throughout – we’ll be grateful.