linux上的几个放可执行文件的目录有什么不同?
linux上的几个放可执行文件的目录有什么不同?
/bin: programs used in booting the system
/usr/bin: standard programs available to users
/usr/local/bin: programs specific to an installation
/sbin: programs used in booting the system (root user)
/usr/sbin: standard programs available to root
相关文档:
看源代码。
#include <linux/kernel.h>
#include <linux/module.h>
#if CONFIG_MODVERSIONS==1
#define MODVERSIONS
#include <linux/modversions.h>
#endif
int init_module()
{
printk("Hello, I'm kernel\n");
return 0;
}
void cleanup_module()
{
printk("I'm kernel, bye\n");
} ......
linux中一共有32种信号,在/usr/include/bits/signum.h 头文件中可以看到
#define SIGHUP 1 /* Hangup (POSIX). */
#define SIGINT 2 /* Interrupt (ANSI).& ......
Linux 安装中文包
首先,安装中文包:
#yum groupinstall chinese-support
其次,修改一下字符编码的配置。
# vi /etc/sysconfig/i18n
修改后内容如下:
LANG="zh_CN.GB18030"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en:zh_CN.GB18030"
SYSFONT="latarcyrheb-sun16"
最后重启服 ......
因为公司的板子上键盘不好按,所以写个网络版的,方便调试。
client .c
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <linux/input.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#inclu ......