LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 827|回复: 5

问一个被问烂的问题:怎样自动挂靠NTFS文件系统

[复制链接]
发表于 2005-7-22 22:57:42 | 显示全部楼层 |阅读模式
我用了别人说的,结果中文显示为乱码

(mount -o iocharset=cp936 /dev/hda7 /mnt/f)
发表于 2005-7-23 12:08:16 | 显示全部楼层
修改/etc/fstab
加入一行
/dev/hda1    /mnt/win      ntfs     defaults,iocharset=cp936,ro 0 0
上面的hda1写你自己要挂载的NTFS硬盘位置,,,而/MNT/WIN是你自己要挂载到的文件夹,,你可以自定。。。。
回复 支持 反对

使用道具 举报

发表于 2005-7-23 12:26:58 | 显示全部楼层

和linux下的编码一致就可以了
而不是生搬硬套的用 cp936
回复 支持 反对

使用道具 举报

发表于 2005-7-23 13:13:22 | 显示全部楼层

  1. Mount options for ntfs
  2.        iocharset=name
  3.               Character  set to use when returning file names.  Unlike VFAT, NTFS suppresses names that contain uncon-
  4.               vertible characters. Deprecated.

  5.        nls=name
  6.               New name for the option earlier called iocharset.

  7.        utf8   Use UTF-8 for converting file names.

  8.        uni_xlate=[0|1|2]
  9.               For 0 (or `no' or `false'), do not use escape sequences for unknown Unicode characters.  For 1 (or `yes'
  10.               or  `true')  or 2, use vfat-style 4-byte escape sequences starting with ":". Here 2 give a little-endian
  11.               encoding and 1 a byteswapped bigendian encoding.

  12.        posix=[0|1]
  13.               If enabled (posix=1), the file system distinguishes between upper and lower case. The  8.3  alias  names
  14.               are presented as hard links instead of being suppressed.

  15.        uid=value, gid=value and umask=value
  16.               Set  the  file  permission on the filesystem.  The umask value is given in octal.  By default, the files
  17.               are owned by root and not readable by somebody else.
复制代码

先看看你的locale的结果,再来决定mount -o挂载的参数。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-7-23 14:53:32 | 显示全部楼层
多谢上面几位,己经搞定
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-7-24 16:08:10 | 显示全部楼层
我来总结一下吧

一般先查看自己的编码,方法:在命令行后输入:locale

看自己的编码

比如我的是utf8

然后在/mnt下建个目录,如winF(对应windows下的F盘)

那么就应该是

mount  -t  ntfs  -o iocharset=utf8  /dev/had7  /mnt/winF
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表