Linux 判断机器的字节顺序
#include <fcntl.h>
int main(void)
{
typedef union un{
short s;
char c[sizeof(short)];
}un;
un myun;
myun.s = 0x0102;
if(sizeof(short) == 2){
if(myun.c[0] == 1 && myun.c[1] == 2)
printf("big-endian\r\n");
else if(myun.c[0] == 2 && myun.c[1] == 1)
printf("little-endian\r\n");
else
printf("unkown\r\n");
}
return 0;
}
摘自《Unix 网络编程》
相关文档:
1,先看看工作队列和tasklet的区别:
(1) 定时器和tasklet:
Tasklets resemble kernel timers in 3 ways.
1)They are always run at interrupt time,
2)they always run on the same CPU that schedules the ......
nginx("engine x")是一个高性能的HTTP和反向代理服务器,是由俄罗斯人Igor Sysoev建立的项目,超轻量级,超快处理能力。
目前使用的nginx版本是0.7.61
nginx的官言网站为:http://nginx.net/
下载地址为:http://sysoev.ru/nginx/nginx-0.7.61.tar.gz
nginx需要pcre的支持,所以我们需要下载pcre
pcre全名为Perl Compa ......
转自:http://www.oracle.com/technology/global/cn/pub/articles/calish-find.html
Linux Find 命令精通指南
作者:Sheryl Calish
简单介绍这一无处不在的命令的强大的方面以及混乱的方面。
2008 年 7 月发布
Linux find
命令是所有 Linux 命令中最有用的一个,同时也是最混乱的一个。它很难,因为它的语法与其他 ......
1、将文件checkout到本地目录
svn checkout path(path是服务器上的目录)
例如:svn checkout svn://192.168.1.1/pro/domain
简写:svn co
2、往版本库中添加新的文件
svn add file
例如:svn add test.php(添加test.php)
svn add *.php(添加当前目录下所有的php文件)
3、将改动的文件提交到版本 ......