易截截图软件、单文件、免安装、纯绿色、仅160KB

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 网络编程》


相关文档:

Linux的工作队列

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 ......

Linux Find 命令精通指南

转自:http://www.oracle.com/technology/global/cn/pub/articles/calish-find.html
Linux Find 命令精通指南
作者:Sheryl Calish
简单介绍这一无处不在的命令的强大的方面以及混乱的方面。
2008 年 7 月发布
Linux find
命令是所有 Linux 命令中最有用的一个,同时也是最混乱的一个。它很难,因为它的语法与其他 ......

VMware下Windows与Linux文件共享

此处vmware版本为6.5 ,主机为windows xp,vmware 安装了redhat linux
1.网络设置:
打开vmware,点vmware->setting->Hardware->Newwork Adapter->Custom - >
VMnet1(host-only) 
查看windows网络连接,看到一个VMnet1的连接,设置它的ip与子网掩码。如:IP:192.168.13.1 ,子网掩码 255.255.255.0 ......

linux tail 命令详解!Linux 文件内容查看工具介绍

cat 是一个文本文件查看和连接工具。查看一个文件的内容,用cat比较简单,就是cat 后面直接接文件名。
比如:
[root@localhost ~]# cat /etc/fstab
为了便于新手弟兄灵活掌握这个工具,我们多说一点常用的参数;
1.0 cat 语法结构;
cat [选项] [文件]...
选项
  -A, --show-all    &nbs ......

Linux 守护进程的编程方法

http://www.softhouse.com.cn/linux/knowledge/tech/7320.html      
                                   ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号