2020年2月15日

c gethostbyname函数使用

摘要: 1. 使用gethostbyname(char*)函数,拿到struct hostent 2. 使用inet_ntop()转换成ip地址 #include <stdio.h> #include <signal.h> #include <unistd.h> #include <stdlib.h> #i 阅读全文

posted @ 2020-02-15 20:43 luckygxf 阅读(928) 评论(0) 推荐(0) 编辑

shell 递归遍历文件夹文件

摘要: #!/bin/bash dirpath=$1 function read_dir() { for file in `ls $1` do #echo "$1:"$1 if [ -d $1/$file ];then cd $1/$file read_dir $1"/"$file cd - else ec 阅读全文

posted @ 2020-02-15 14:20 luckygxf 阅读(667) 评论(0) 推荐(0) 编辑

导航