linux客户端连接后中文乱码解决
用SSH登陆远程的linux服务器或用win浏览运行samba的linux服务器中有中文名的文件夹的时候,看到里面的中文文件名都是乱码,编辑文档的时候都是串行的,每次要export LANG=en麻烦死了。
上网四处搜索,求教高人,得此办法。
(1) 打开/etc/sysconfig/i18n
设置为:
LANG="zh_CN.GB2312"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.GB18030:zh_CN.GB2312:zh_CN.UTF-8:zh:en_US.UTF-8:en_US:en:ja_JP.UTF-8:ja_JP:ja"
SYSFONT="lat0-sun16"
SYSFONTACM="8859-15"
其中LANG="zh_CN.GB2312" 是必须的(如果你不想让中文乱码的话!!!)
其它的可以按照自已的需求来改变。
(2) 打开smb.conf
添加:
display charset=cp936
unix charset=cp936
dos charset=cp936
相关文档:
1、升级系统
yum check-update
yum update
2、安装一些常用的工具
yum install ntp iptraf sysstat screen subversion wget bzip2 nfs-utils vim-common
3、设置每天自动核准时间
# crontab -e
0 * * * * /usr/sbin/ntpdate 210.72.145.44
:wq
4、安装一些开发包
# yum install make gcc gcc-c++ libjpeg-devel ......
转自:http://www.cic.tsinghua.edu.cn/jdx/book1/CHAPTER3.htm
在源文件开始增加#include <winsock.h>语句。
调用WSAStartup()函数初始化Windows Sockets DLL,并在结束时调用WSACleanup()函数通知Windows Sockets DLL释放资源。
将套接字的类型为int改为SOCKET。
获取、设置错误码不要使用全局变量er ......
功能描述:
获取一些文件相关的信息。
用法:
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int stat(const char *path, struct stat *buf);
int fstat(int filedes, struct stat *buf);
int lstat(const char *path, struct stat *buf);
参数:
path:文件 ......
本文摘自 http://hi.baidu.com/yuhongchun027/blog/item/2ac559517ec1f5898c543002.html
Linux中tty pty pts 概念区别
基本概念:
1> tty(终端设备的统称):
tty一词源于Teletypes,或者teletypewriters,原来指的是电传打字机,是通过串行线用打印机键盘通过阅读和发送信息的东西,后来这东西被键盘与显示器取代,所 ......
本来想用 kernel-module-ntfs-2.6.18-53.el5-2.1.27-0.rr.10.11.i686这种格式的包,但发现系统内核 2.6.18-164.2.1.el5.plus
根本找不到对应的文件,所以只好使用 ntfs-3g.
安装很简单,直接从http://www.ntfs-3g.org/index.html 下载最新的文件,
#wget http://www.ntfs-3g.org/ntfs-3g-2009.4.4.tgz
# ......