轻松通过命令行共享文件

# 使用 cURL 上传 $ curl --upload-file ./hello.txt http://f.odata.cc/hello.txt http://f.odata.cc/Q0jTvIuXp7/hello.txt # 使用 Shell 函数上传 $ transfer hello.txt ##################################################### 100.0% http://f.odata.cc/hsVBUXdfIQ/hello.txt
# 从网页上传 拖拽文件到这里,或 点击选择文件。

# 下载所有文件

zip tar.gz
了解更多

适用于命令行

通过 URL 分享文件

不限上传

文件永久保存

免费使用

加密你的文件

最大下载次数

在浏览器中预览你的文件!

示例使用案例

如何上传

# 使用 cURL 上传文件 $ curl --upload-file ./hello.txt http://f.odata.cc/hello.txt http://f.odata.cc/Q0jTvIuXp7/hello.txt $ curl -H "Max-Downloads: 1" -H "Max-Days: 5" --upload-file ./hello.txt http://f.odata.cc/hello.txt http://f.odata.cc/Q0jTvIuXp7/hello.txt # 下载文件 $ curl http://f.odata.cc/Q0jTvIuXp7/hello.txt -o hello.txt

将 Shell 函数添加到 .bashrc 或 .zshrc

# 将以下内容添加到 .bashrc 或 .zshrc transfer(){ if [ $# -eq 0 ];then echo "没有指定参数。\n用法:\n transfer \n ... | transfer " >&2;return 1;fi;if tty -s;then file="$1";file_name=$(basename "$file");if [ ! -e "$file" ];then echo "$file: 没有此文件或目录" >&2;return 1;fi;if [ -d "$file" ];then file_name="$file_name.zip" ,;(cd "$file"&&zip -r -q - .)|curl --progress-bar --upload-file "-" "http://f.odata.cc/$file_name"|tee /dev/null,;else cat "$file"|curl --progress-bar --upload-file "-" "http://f.odata.cc/$file_name"|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file "-" "http://f.odata.cc/$file_name"|tee /dev/null;fi;} # 现在可以使用 transfer 函数 $ transfer hello.txt
更多示例

一次上传多个文件

$ curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt http://f.odata.cc/ # 合并下载为 zip 或 tar 压缩包 $ curl http://f.odata.cc/(Q0jTvIuXp7/hello.txt,hsVBUXdfIQ/world.txt).tar.gz $ curl http://f.odata.cc/(Q0jTvIuXp7/hello.txt,hsVBUXdfIQ/world.txt).zip

加密文件并上传

# 使用 gpg 加密文件 $ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" http://f.odata.cc/test.txt # 下载并解密 $ curl http://f.odata.cc/Q0jTvIuXp7/test.txt|gpg -o- > /tmp/hello.txt

扫描文件是否含有恶意软件

# 使用 Clamav 扫描恶意软件 $ wget http://www.eicar.org/download/eicar.com $ curl -X PUT --upload-file ./eicar.com http://f.odata.cc/eicar.com/scan # 上传恶意软件到 VirusTotal 获取永久链接 $ curl -X PUT --upload-file nhgbhhj http://f.odata.cc/test.txt/virustotal

备份 mysql 数据库,加密并上传

# 备份,加密并上传 $ mysqldump --all-databases|gzip|gpg -ac -o-|curl -X PUT --upload-file "-" http://f.odata.cc/test.txt
Fork me on GitHub