linux命令行下中文文件名乱码的解决方法
linux命令行下中文文件名乱码的解决方法
首先查询支持的编码:
locale -a
如果没有你需要的编码,例如zh_CN.utf8
root运行: #dpkg-reconfigure locales
选择你需要的编码,用空格选中,可多选。tab选择“OK”,回车。
默认编码选择zh_CN.utf8
安装你所需要的编码。
修改/etc/profile,
注释掉
export LC_ALL=C
增加
export TERM=xterm-color
export LC_CTYPE=zh_CN.gb2312
export LANG=en_US.UTF-8
相关文档:
/******************************
*
* server.c
*
******************************/
#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<errno.h>
#include<string.h>
#include<netinet/in.h>
#include<sys/wait.h> ......
#include <sys/ipc.h>
#include <stdio.h>
#include <sys/shm.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#define PERM IPC_CREAT //S_IRUSR|S_IWUSR
#include <errno.h>
int main(int argc,char **argv)
{
int shmid[2048];
c ......
class CTimeTickCount
{
public:
CTimeTickCount(int threadIndex, int id )
{
struct timezone tz;
gettimeofday(&m_tvStartTime, &tz);
// m_tmStartTime = ACE_OS::gettimeofday();
m_iThreadIndex ......
存储管理
MMU与内核内存管理的关系
从线性地址到物理地址的映射,通过页目录表和页表来实现的。
内核为存储管理维护了一套复杂的数据结构,页目录表和页表是主要的结构之一。这些表也是存储在物理内存页面中的,因此,也是以4K为单位。
表中的每个表项都记录了一个32位的地址,为4个字节,因此,一个表中最多可以有1K项 ......