使用lrzsz在windown和linux间传输文件
xshell软件通过ssh协议连接linux;
登录之后,sz 表示服务器发送文件;rz表示服务器接收文件;
sz file 1 file2 dir/* : 不包含文件夹dir;
rz接收到服务器的路径为执行rz指令的路径;
使用tftp在linux间传输文件
tftpserver安装
1. sudo apt-get install tftpd tftp openbsd-inetd
2. sudo vi /etc/inetd.conf
#:BOOT: TFTP service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers."
#tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp (/srv/tftp 为默认tftp目录)
#修改如下文件
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftproot
3.sudo mkdir /tftproot
4.sudo chmod 777 /tftproot
5.sudo /etc/init.d/openbsd-inetd restart
6.查看69端口是否有打开 :netstat -an | more | grep udp
udp 0 0 0.0.0.0:69 0.0.0.0:*
7.本机测试:
a. 在/tftproot 下新建文件1.txt
b. 在其他目录下测试:
tftp 127.0.0.1
tftp> get 1.txt
Received 12 bytes in 0.0 seconds
tftp> quit
传输指令
利用目标板上传资料到主机,命令如下:
tftp -p -l filename serverip(这里filename是目标板文件的完整路径)
目标板从主机下载资料:
tftp -g -r filename serverip(这里filename是主机上tftp默认目录里的文件名,因为tftpserver将tftp目录视为根目录,所以不需要填写完整路径)5