transfer.sh ファイル共有 20210607
#Curl #Linux #Shell #CommandLine #Bashrc or #Zshrc #Transfer #Easy #Fast #File #Sharing
コマンドラインから、curlを使用してファイルのアップロード、ダウンロードが可能なサービスです。
https://transfer.sh/
transfer.sh - Easy and fast file sharing from the command-line.
以下のようにコマンドラインからファイルをアップロードできます。
$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt
アップロードすると以下のようなアップロードしたファイルのURLを返します。
https://transfer.sh/66nb8/hello.txt
上記外にも、ダウンロード数、保存日数を個別に設定することも可能になっています。
$ curl -H "Max-Downloads: 1" -H "Max-Days: 5" --upload-file ./hello.txt https://transfer.sh/hello.txt
ファイルのダウンロードも、コマンドラインから可能となっています。
$ curl https://transfer.sh/66nb8/hello.txt -o hello.txt
使用しているシェルの.bashrc、もしくは.zshrcに以下を書き加えると、コマンドラインで『transfer hello.txt』とするだけで、ファイルのアップロードが可能となります。
transfer(){ if [ $# -eq 0 ];then echo "No arguments specified.\nUsage:\ntransfer <file|directory>\n... | transfer <file_name>">&2;return 1;fi;if tty -s;then file="$1";file_name=$(basename "$file");if [ ! -e "$file" ];then echo "$file: No such file or directory">&2;return 1;fi;if [ -d "$file" ];then file_name="$file_name.zip" ,;(cd "$file"&&zip -r -q - .)|curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null,;else cat "$file"|curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null;fi;}
$ transfer hello.txt
以下に、コマンドラインから使用可能なサービスのリストがあります。
https://github.com/chubin/awesome-console-services
GitHub - chubin/awesome-console-services: A curated list of awesome console services (reachable via HTTP, HTTPS and other network protocols)
https://www.youtube.com/watch?v=b7yYNEBHD10
Transfer.sh is an instant sharing tool for programmers - YouTube
https://t.co/PFj2saugpU is an instant sharing tool for programmers https://t.co/kJU6EtbtHw by @johnbiggs pic.twitter.com/fZjjHxPxHH
— TechCrunch (@TechCrunch) June 22, 2018
https://techcrunch.com/2018/06/22/transfer-sh-is-an-instant-sharing-tool-for-programmers/
Transfer.sh is an instant sharing tool for programmers | TechCrunch
curlでコマンドラインから任意のファイルをアップロードできるサービス「transfer.sh」 http://t.co/rdXO5FqwP3
— ライフハッカー[日本版] (@lifehackerjapan) December 13, 2014
https://www.lifehacker.jp/2014/12/141214curltransfersh.html
curlでコマンドラインから任意のファイルをアップロードできるサービス「transfer.sh」 | ライフハッカー[日本版]
「transfer.sh」はcurlでコマンドラインから任意のファイルをアップロードできるサイトです。コマンドラインからファイルアップロードし、アップロードされたURLがレスポンスで返ってきます。
curlについては、以下が参考になります。
[@IT]ネットワーク管理の基本Tips:連番ファイルをダウンロードして他のコマンドに渡すには? curlコマンドの使い方 http://t.co/8Cq8EoKodf
— ITmedia (@itmedia) June 30, 2015
https://www.atmarkit.co.jp/ait/articles/1507/01/news021.html
連番ファイルをダウンロードして他のコマンドに渡すには? curlコマンドの使い方:ネットワーク管理の基本Tips - @IT
【本日読まれた記事】Windows 10で標準で用意されるようになったcurlを使ってみる
— ASCII.jp (@asciijpeditors) July 28, 2020
▼詳細はこちらhttps://t.co/fZDhnKzMWS pic.twitter.com/H7QKXolpe9
https://ascii.jp/elem/000/004/021/4021036/
ASCII.jp:Windows 10で標準で用意されるようになったcurlを使ってみる (1/2)
curlは1990年代後半に開発が始められ、当初はUnix(SunOS)上で、名前もhttpgetだった。開発が進むとともに、複数のプロトコルをサポートするなどして「cURL」となったのは1998年で、この頃にLinuxにも移植されたようだ。
#ファイル #共有 #20210607 #アップロード #ダウンロード #サービス #シェル #コマンドライン
#fictitiousness #2021
https://ascii.jp/elem/000/004/021/4021036/
ASCII.jp:Windows 10で標準で用意されるようになったcurlを使ってみる (1/2)
http://ascii.jp/elem/000/001/630/1630041/
ASCII.jp:Windows 10 RS4に追加された「curl」と「tar」コマンド|Windows Info
https://www.atmarkit.co.jp/ait/articles/1507/01/news021.html
連番ファイルをダウンロードして他のコマンドに渡すには? curlコマンドの使い方:ネットワーク管理の基本Tips - @IT
いいなと思ったら応援しよう!
![極論空手形 / Extreme Argument Fictitious Bill](https://assets.st-note.com/production/uploads/images/129722943/profile_3b17dbddb667385804e84df69ca0e945.png?width=600&crop=1:1,smart)