Ⅰ linux tftp如何传文件夹给开发板
通过tftp服务器和开发板之间进行数据传输方法如下:
首先要建立好tftp服务器;
在tftp配置文件/etc/xinetd.d/tftp,设置如下:
service tftp
{
socket_type= dgram
protocol= udp
wait= yes
user= root
server= /usr/sbin/in.tftpd
server_args= -s /tftpboot -c
disable= no
per_source= 11
cps= 100 2
flags= IPv4
}
3.将需要下载到开发板的文件放入对应的tftp下载目录,在这里设置为/tftpboot目录下
4.保证开发和tftpboot服务器之间网络为通路状态;
5.最后进行下载命令操作;
Ⅱ tftp到底怎么使用
如何使用Tftp:
TFTP 自带的帮助信息:
TFTP [-i] host [GET | PUT] source [destination]
-i Specifies binary image transfer mode (also called
octet). In binary image mode the file is moved
literally, byte by byte. Use this mode when transferring binary files.
host Specifies the local or remote host.
GET Transfers the file destination on the remote host to
the file source on the local host.
PUT Transfers the file source on the local host to
the file destination on the remote host.
source Specifies the file to transfer.
destination Specifies where to transfer the file.
说明:
-i选项是以二进制模式传送文件,很多Exploit代码就需要用这种模式来传送。
Host是开启了tftp服务的主机,可以是本地主机也可以是远程主机。
get就是到当前运行的目录里面下载,而put就是把文件上传到了开了tftp服务的机子。Source是你要上传或者是下载的文件名称。
下面举几个列子:
C:Longker>tftp -i 202.xx.xx.165 get sc.exe
tftp -i 202.xx.xx.165 get sc.exe
Transfer successful: 63248 bytes in 1 second, 63248 bytes/s
这个是从开了tftp服务的主机下载sc.exe程序,速度不错吧 :)
C:Longker>tftp -i 202.xx.xx.165 put sc.exe
tftp -i 202.xx.xx.165 put sc.exe
Transfer successful: 63248 bytes in 1 second, 63248 bytes/s
上面是把sc.exe上传到tftp服务器。