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 ......
administer@administer-laptop:~/tem/tt$ cat hello.asm
[section .data]
strHello db "Hello, world!",0Ah
STRLEN equ $-strHello
[section .text]
global _start
_start:
mov edx,STRLEN
mov ecx,strHello
mov ebx,1
mov eax,4
int 0x80
mov  ......
学用Linux命令
2006-01-23 11:18:22 虫子虫子爬@-FiFb /article/-FiFb-liXUWS.html 复制 评论
基础教程-学用Linux命令(1)
Linux虽然是免费的,但它的确是一个非常优秀的操作系统,与MS-WINDOWS相比具有可靠、稳定、速度快等优点,且拥有丰富的根据UNIX版本改进的强大功能。下面,作为一个典型的DOS 和WINDOWS用户, ......
学习Linux终端命令
linux目录架构
/ 根目录
/bin 常用的命令 binary file 的目錄
/boot 存放系统启动时必须读取的档案,包括核心 (kernel) 在内
/boot/grub/menu.lst GRUB设置
/boot/vmlinuz & ......
转载自
http://blog.csdn.net/lyd518/archive/2008/08/19/2797134.aspx
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 ......