您的位置:首页 > 编程语言 > PHP开发

tftp传文件

2016-01-07 14:12 483 查看
用tftp, udpsvd -vE 0 69 tftpd -c /server & 开启tftpd服务器,

然后在318上执行 tftp -pl file ipaddress

tftp -gl main 1.1.1.100即可。

udhcpd -f /app/cfg/udhcpd.conf

#include <fcntl.h>

#include <string.h>

#include <sys/stat.h>

#include <sys/types.h>

#include <unistd.h>

#include <stdio.h>

int main(int argc, char **argv)

{

if(argc!=2){

printf("error par number\n");

return 0;

}

int fd = open (argv[1], O_RDWR);

if(fd==-1){

printf("open %s error\n",argv[1]);

return 0;

}

fsync (fd);

close (fd);

printf("ok\n");

return 0;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: