上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 76 下一页
摘要: man -f openopen (3tcl) - 打开基于文件或命令管道的一个通道open (2) - 用来 打开和创建 一个 文件或设备open (n) - Open a file-based or command pipeline channelopen (1) - start a program on a new virtual terminal (VT).man -k openfdopen (3) - 打开流fopen (3) - 打开流freopen (3) - 打开流iconv_open (3) - 分配... 阅读全文
posted @ 2012-09-17 14:38 ahuo 阅读(285) 评论(0) 推荐(0) 编辑
摘要: kill -l1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR111) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ26) ... 阅读全文
posted @ 2012-09-13 10:52 ahuo 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 执行命令WSDL http://www.wsdl.com/dddd?wsdl生产对于的C#类文件,加入工程既可以使用 阅读全文
posted @ 2012-09-12 13:46 ahuo 阅读(633) 评论(0) 推荐(0) 编辑
摘要: /*server.c*/#include<signal.h>#include<sys/wait.h>#include"inet.h"#include<stdlib.h>intinit_ser(int);intmax(inta,intb){intthemax;if(a>b)themax=a;elsethemax=b;returnthemax;}voidset_name(char*line,char*name){strcpy(name,&line[1]);sprintf(line,"%sjointheroom\n&qu 阅读全文
posted @ 2012-09-05 16:47 ahuo 阅读(2721) 评论(0) 推荐(0) 编辑
摘要: 下载地址:http://sourceforge.net/projects/gsoap2官方网站:http://genivia.com/Products/gsoap/index.html工程: http://files.cnblogs.com/ahuo/gsoap.rar生成代码:soapcpp2.exe add.h 阅读全文
posted @ 2012-08-28 18:07 ahuo 阅读(233) 评论(0) 推荐(0) 编辑
摘要: ssize_t ret; while(len!=0&&(ret=read(fd,buf,len))!=0){if(ret==-1){if(errno==EINTR)continue;perror("read");break;}len-=ret;buf+=ret;}#include <stdio.h>#include <errno.h>#include <string.h>#include <sys/types.h>#include <fcntl.h>intmain (int argc, char * 阅读全文
posted @ 2012-08-27 16:15 ahuo 阅读(261) 评论(0) 推荐(0) 编辑
摘要: ifconfig eth0 ip 更改IP 网关可以用 route命令查看修改添加网关route add default gw 网关地址 删除网关route del default gw 网关地址用这两个命令改`只能保证在电脑开着的时候用` 而且你一重新启动 这俩地址就会还原到以前的`不想还原可以改配置文件网关IP都在 /etc/sysconfig/network-scripts/ifcfg-eth0 这个文件里改 可以永久保存 DNS是在/etc/resolv.conf 这个配置文件里修改 修改后也是永久保存 阅读全文
posted @ 2012-08-27 14:37 ahuo 阅读(246) 评论(0) 推荐(0) 编辑
摘要: sudo apt-get install nfs-kernel-server$sudo gedit /etc/exports/home/ *(rw,sync,no_root_squash)$ sudo /etc/init.d/nfs-kernel-server restart$sudo mount 192.168.1.160:/home /nfs192.168.1.160是服务器ip 阅读全文
posted @ 2012-08-27 14:31 ahuo 阅读(159) 评论(0) 推荐(0) 编辑
摘要: gdbserverUsage: gdbserver [OPTIONS] COMM PROG [ARGS ...] gdbserver [OPTIONS] --attach COMM PID gdbserver [OPTIONS] --multi COMMCOMM may either be a tty device (for serial debugging), orHOST:PORT to listen for a TCP connection.gdbserver 127.0.0.1:1234gdbtarget remote127.0.0.1:1234 阅读全文
posted @ 2012-08-27 10:59 ahuo 阅读(363) 评论(0) 推荐(0) 编辑
摘要: gdb和arm-elf-gdb只是针对的目标平台不一样gdb 是This GDB was configured as "i686-pc-linux-gnu" 本机平台arm-elf-gdb 是This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf". 目标平台是 arm-elf的编译命令./configure --target=arm-elfmake 阅读全文
posted @ 2012-08-27 10:39 ahuo 阅读(800) 评论(0) 推荐(0) 编辑
摘要: error: ignoring return value of是一个警告来的,意思是忽略的返回值,因为打开了-Werror编译选项,就会把警告当错误处理解决办法:WERROR_CFLAGS = #-Werror或者试一下./configure--disable-werror 阅读全文
posted @ 2012-08-27 10:36 ahuo 阅读(1830) 评论(0) 推荐(0) 编辑
摘要: 假设有变量 var= http://www.ahuo.com/test.htm一 # 号截取,删除左边字符,保留右边字符。echo ${var#*//}其中 var 是变量名,# 号是运算符,*// 表示从左边开始删除第一个 // 号及左边的所有字符即删除 http://结果是 :www.ahuo.com/test.htm二 ## 号截取,删除左边字符,保留右边字符。echo ${var##*/}##*/ 表示从左边开始删除最后(最右边)一个 / 号及左边的所有字符即删除 http://www.ahuo.com/ 结果是 test.htm三 %号截取,删除右边字符,保留左边字符echo ... 阅读全文
posted @ 2012-08-24 18:33 ahuo 阅读(556) 评论(0) 推荐(0) 编辑
摘要: flock -x ./lock dd 结束前flock -x ./lock ls 会一直等待也有对应的apiflockint flock(int fd, int operation); 阅读全文
posted @ 2012-08-24 17:22 ahuo 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 为了满足这样的需求:记录文件变化、记录用户对文件的读写,甚至记录系统调用,文件变化通知。本文介绍audit和inotify.什么是auditThe Linux Audit Subsystem is a system to Collectinformation regarding events occurring on the system(s)Kernel events (syscall events)User events (audit-enabled programs)syslog会记录系统状态(硬件警告、软件的log), 但syslog属于应用层, log归咎与软件, 并不会记录所有动作 阅读全文
posted @ 2012-08-24 11:31 ahuo 阅读(6085) 评论(1) 推荐(0) 编辑
摘要: 用 #defines 和 bit masks 操作。这是一个有极高可移植性#define BIT3 (0x1 << 3)static int a;void set_bit3(void){ //a = 0001a |= BIT3; // a = 1001}void clear_bit3(void){//~(1<<1)= 1111111111111101// ~(1<<2)= 1111111111111011a &= ~BIT3;} 阅读全文
posted @ 2012-08-23 15:19 ahuo 阅读(250) 评论(0) 推荐(0) 编辑
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 76 下一页