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 編碼沒有超過一頁,較好複製

沒有留言:

OpenVPN disconnect after 3.4.0

如果 OpenVPN 本來都連線正常,Server 也沒動,OpenVPN Client 升版到 3.4.0 以後的版本,就不能連了, 狀況是連上又斷線,一直重複 (repeat connect and disconnect) 我的環境 RouterOS 6.49.14 及 7....