自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

推薦一款 GitHub 星標 11.5K 的命令行文件傳輸神器(開源免費,支持 10GB 大文件)

系統(tǒng) Linux
在工作和生活中,我們經(jīng)常需要在不同設(shè)備之間傳輸文件,但往往會遇到需要安裝第三方軟件、文件大小限制、傳輸速度慢等問題。

[[423120]]

 在工作和生活中,我們經(jīng)常需要在不同設(shè)備之間傳輸文件,但往往會遇到需要安裝第三方軟件、文件大小限制、傳輸速度慢等問題。安裝第三方軟件還好,但是限制傳輸速度和文件大小就非常惡心了,用著用著就得逼得你充值付費了。不然緊急需要傳輸一個東西,就非?;ㄙM時間和精力了。

1軟件介紹

Easy and fast file sharing from the command-line.

當然,我們可以也使用,老牌的 百度云盤(非會員限速)、Dropbox(速度非常之慢)和 Google Drive(需要科學上網(wǎng)),新進的 阿里云盤(雖然不限速但上傳不能加速)、奶??靷?有文件大小總量限制)。但是這里我們要介紹的是一個基于命令行的文件傳輸工具 —— transfer.sh。

  •  Made for use with shell
  •  Share files with a URL
  •  For free
  •  Upload up to 10 GB
  •  Files stored for 14 days
  •  Encrypt your files
  •  Maximize amount of downloads

2使用方式

    Sample use cases

  •  [1] 命令行使用 
  1. # 將shell函數(shù)添加到.bashrc或.zshrc文件中  
  2. transfer() {  
  3.   if [ $# -eq 0 ]; then  
  4.     echo "No arguments specified."  
  5.     echo "Usage: "  
  6.     echo "  transfer <file|directory> ... | transfer <file_name> 
  7.     return 1  
  8.   fi  
  9.   if tty -s; then  
  10.     file="$1"  
  11.     file_name=$(basename "$file")  
  12.     if [ ! -e "$file" ]; then  
  13.       echo "$file: No such file or directory"  
  14.       return 1  
  15.     fi  
  16.     if [ -d "$file" ]; then  
  17.       file_name="$file_name.zip"  
  18.       (cd "$file" && zip -r -q - .) | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null  
  19.     else  
  20.       cat "$file" | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null  
  21.     fi  
  22.   else  
  23.     file_name="$1"  
  24.     curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null  
  25.   fi  
  26.  
  27. # 現(xiàn)在可以使用函數(shù)來上傳文件  
  28. $ transfer hello.txt 
  •  [2] 簡單上傳文件 - 官方支持界面上傳 
  1. # 使用curl命令上傳文件  
  2. $ curl --upload-file ./hello.txt https://transfer.sh/hello.txt  
  3. https://transfer.sh/66nb8/hello.txt  
  4. # 上傳文件設(shè)定最大下載次數(shù)和過期時間  
  5. $ curl -H "Max-Downloads: 1" -H "Max-Days: 5" --upload-file ./hello.txt https://transfer.sh/hello.txt  
  6. https://transfer.sh/66nb8/hello.txt  
  7. # 下載文件  
  8. $ curl https://transfer.sh/66nb8/hello.txt -o hello.txt  
  1. # 還支持wget上傳文件  
  2. $ wget --method PUT --body-file=/tmp/file.tar https://transfer.sh/file.tar -O - -nv  
  3. # 還支持HTTPie上傳文件  
  4. $ http https://transfer.sh/ -vv < /tmp/test.log  
  5. # 還支持PowerShell上傳文件  
  6. PS H:\> invoke-webrequest -method put -infile .\file.txt https://transfer.sh/file.txt 
  •  [3] 一次上傳多個文件 
  1. # 使用filedata執(zhí)行文件地址  
  2. $ curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt https://transfer.sh/  
  3. # 將下載合并為zip或tar存檔  
  4. $ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).tar.gz  
  5. $ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).zip 
  •  [4] 傳輸前使用加密您的文件 
  1. # 使用gpg加密文件  
  2. $ cat /tmp/hello.txt | gpg -ac -o- | curl -X PUT --upload-file "-" https://transfer.sh/test.txt  
  3. # 下載并解密  
  4. $ curl https://transfer.sh/1lDau/test.txt | gpg -o- > /tmp/hello.txt 
  1. # 使用openssl加密文件  
  2. $ cat /tmp/hello.txt | openssl aes-256-cbc -pbkdf2 -e | curl -X PUT --upload-file "-" https://transfer.sh/test.txt  
  3. # 下載并解密  
  4. $ curl https://transfer.sh/1lDau/test.txt | openssl aes-256-cbc -pbkdf2 -d > /tmp/hello.txt  
  1. # 從keybase導入key  
  2. $ keybase track [them]  
  3. # 加密文件  
  4. $ cat somebackupfile.tar.gz | keybase encrypt [them] | curl --upload-file '-' https://transfer.sh/test.txt  
  5. # 解密下載  
  6. $ curl https://transfer.sh/sqUFi/test.md | keybase decrypt 
  •  [5] 掃描惡意軟件 
  1. # 使用Clamav掃描惡意軟件或病毒  
  2. $ wget http://www.eicar.org/download/eicar.com  
  3. $ curl -X PUT --upload-file ./eicar.com https://transfer.sh/eicar.com/scan  
  4. # 上傳惡意軟件到VirusTotal并獲得永久鏈接  
  5. $ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal 
  •  [6] 加密傳輸備份 mysql 數(shù)據(jù)庫 
  1. # 備份+加密+傳輸  
  2. $ mysqldump --all-databases | gzip | gpg -ac -o- | curl -X PUT --upload-file "-" https://transfer.sh/test.txt 
  •  [7] 發(fā)送帶有傳輸鏈接的電子郵件 
  1. # 傳輸和發(fā)送帶有鏈接的電子郵件  
  2. $ transfer /tmp/hello.txt | mail -s "Hello World" user@yourmaildomain.com 
  •  [8] 傳輸日志文件 
  1. # grep syslog for pound and transfer  
  2. $ cat /var/log/syslog | grep pound | curl --upload-file - https://transfer.sh/pound.log  

 

責任編輯:龐桂玉 來源: 奇妙的Linux世界
相關(guān)推薦

2021-04-09 16:25:00

GitHub代碼開發(fā)者

2021-09-16 15:52:05

GitHub命令URL

2020-11-10 10:46:57

開源后臺管理系統(tǒng)Base Admin

2021-05-20 12:16:17

Linux命令Axel

2020-01-30 18:10:28

GitHub代碼開發(fā)者

2020-03-13 10:18:43

GitHub 技術(shù)開源

2015-07-29 09:15:43

Dukto開源工具

2023-06-06 08:57:27

2022-04-14 11:09:17

開源項目搜索

2021-11-16 14:55:50

命令行Linux開源

2016-10-20 09:57:58

Linux轉(zhuǎn)換工具

2020-07-28 14:23:55

代碼開發(fā)Github

2019-09-16 09:58:16

GitHub搶票Python

2019-12-24 11:13:02

GitHub代碼開發(fā)者

2021-07-21 16:13:54

GitHub 技術(shù)開源

2021-08-25 11:10:41

GitHub命令Linux

2012-11-09 13:42:33

Google Clou

2013-05-29 09:59:20

Java-RMI遠程調(diào)用

2021-05-28 09:55:02

命令行加密文件Linux

2019-02-25 10:18:43

工具代碼測試
點贊
收藏

51CTO技術(shù)棧公眾號