linux系统croc命令在电脑之间传输文件和文件夹

1、croc安装

方法1:

 curl https://getcroc.schollz.com | bash

方法2(ubuntu):

gdebi croc_8.3.2_Linux-64bit.deb ## (需要提前下载好安装包)  https://github.com/schollz/croc/releases

2、使用前确保两台计算机都安装了croc

使用方法:

root@PC1:/home/test2# ls
test.txt
root@PC1:/home/test2# croc send test.txt   ## croc send 直接跟文件或者文件夹
Sending 'test.txt' (10 B)
Code is: 5414-neon-absorb-remote
On the other computer run

croc 5414-neon-absorb-remote    ## 在接收主机中直接输入:croc 5414-neon-absorb-remote 即可接收

2、可以在发送文件的使用指定传输密码

例如:

croc send test.txt --code myfirstcode    ## 在接收主机中输入:croc myfirstcode即可接收

参考:https://mp.weixin.qq.com/s?__biz=MzI4MDEwNzAzNg==&mid=2649455609&idx=2&sn=fa5131db4d2198261a3174e0689d0512&chksm=f3a25a8ac4d5d39c0367c7daf89ad38604b0bd9986f6539d795e306544886553b8b19bdccb34&mpshare=1&scene=23&srcid=1222iWg1kFtTl5xlpboeRmIL&sharer_sharetime=1640163280480&sharer_shareid=4ed060cc4cd1efce40e3ab6dd8d8c7d4#rd

原文地址:https://www.cnblogs.com/liujiaxin2018/p/15721336.html