Skip to main content

File Sharing From Unix Command Line

Transfer.sh is the beautiful service which allows you to share your files from Unix command line. you can upload your files via curl command.



Here is how you can share your files from unix command line.

curl --upload-file cat.png https://transfer.sh/cat.png

To download the file you can use the below command

curl https://transfer.sh/XEpVi/cat.png -o cat.png

Transfer.sh is also allows you to transfer multiple files

curl -i -F filedata=@/tmp/cat.png -F filedata=@/tmp/dog.png https://transfer.sh/ 











Using the transfer.sh you can also use the wget command to upload the files. here is the command how you can upload the files to the transfer.sh .
wget --method PUT --body-file=/tmp/file.tar https://transfer.sh/file.tar -O - -nv

Transfer.sh alias on Unix:

Edit your bashrc file using
nano ~/.bashrc
And add this to .bashrc
 transfer() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /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; } 

After adding this you can use the transfer command like
 transfer cat.png

Benefits: 


  • It is made for the shell  users
  • Upload files up to 5 GBs
  • File stored for max 14 days.
  • Free for all!
  • you can preview your file on your browser.

Popular posts from this blog

31 Most amaing fact about India

Here are some most amazing unknown facts about India from iGyan.Org that will blow your mind and you will be proud of it.

The name India is derived from Indus River, which originates from the Old Persian word Sindhi.India is the seventh largest country by area.India is the only country in the world which has both tigers and lions in the wild.New Delhi's air is the most polluted in the world.Indian Railways is the largest railway network in the world under single management.Other than US and Japan, India is the only country to have built a super computer indigenously. India is ranked the sixth country in the world in terms of satellite launches.The world's first university was established in Takshashila in 700 BC.Ayurveda of India is the earliest school of medicine known to the world.Four out of 10 Silicon Valley startups are run by Indians.India is the world's premier center for diamond cutting and polishing. Nine out of every 10 stones sold in the world pass through India…

Interesting facts about Indian currency symbol

Here are some interesting fact about the Indian currency symbol. Indian Currency Symbol has been presented publiclly by the goverment of india on 15th july 2010.The symbol uses U+20B9 unicode charactar.Indian currency symbol was designed by Udaya Kumar.

Top Inspiring Quotes From Albert Einstein

Most Beautifully said Top Inspiring Quotes By Albert Einstein, A Huge leftest collection of Einstein Quotes.