2021年12月4日 星期六

Copy small file trick between terminal A and B

有時兩個 Terminal 之間無法直接連線或透過第三方交換檔案,甚至無網路的的話,可以透過此技巧交換檔案

檔案是 foo.zip
在 Terminal A 把檔案壓縮再 base64 編碼
gzip -c foo.zip | base64

把 base64 code 貼到 Terminal B 的一個檔 foo.b64,然後再 base64 decode,解壓後輸出
base64 -d foo.b64 | gunzip > foo.zip

適合比較小的檔案,base 64 編碼沒有超過一頁,較好複製

沒有留言:

Windows 10 ESU extended to 2027-10-12

微軟延長了 Windows 10 ESU 支援時間至 2027-10-12 (又加一年) 可以使用 ConsumerESU 腳本快速啟用 ESU 下載 ZIP 包解開後,以系統管理員身分執行 Consumer_ESU_Enrollment_run.cmd