linux读写ntfs

frankly speaking, i hope to get a higher salary.

yours frankly= yours sincerely = sincerely yours =yours truly = parted from , beloved : she refused to be parted from her beloved cat. = yours beloved

my: mine, your: yours, his:his , her:hers, their: theirs, 前者表示形容词性 物主代词,后面要接名词, 后者是名词性物主代词:

this is your book. this is book of yours.

faith: n. [fei0], =belief, trust: i have faith in your talents. faithfully

命令格式: 命令 【选项】 参数   : 命令  参数 【选项】  即: 有些(少数)命令可以把选项放在最后, 如: mount /dev/sda1 /mnt/WinC   -t ntfs -o iocharset=cp936

find .  -name "test" -type f -mtime +5 -ok/exec  ls -l {} ;

// 一般选项: 短选项(单字母)的用-, 长选项(单词)用--, 但也有例外的, 如find -name (长选项用了单线-).

linux中用来表示时间的: min=分钟, time=天数:

amin  atime(表示访问过的) , cmin ctime(改变状态的 ), mmin , mtime( 表示修改文件数据内容的):

 find -name "in*" -type f -perm 644 -mtime 0 -exec ls {} ;  : -exec 后面接 : 命令 {} ;  {}之间没有空格, {} 和;之间有空格, 而且后面不要用引号.

disease[di' zi:z] sane['sein]: 有病的/ 健全的,健康的; he has a diseased body but a sane mind.

--------------------------------------------------------------

要访问Windows的ntfs文件系统(fat32系统可以直接访问, 如U盘), 需要使用ntfs-3g(ntfs-3g 1.328 - Third Generation NTFS Driver),和其依赖包: fuse.xxx.tgz.

默认的./configure配置的目的地址就是/usr/bin,/usr/lib等等, 所以不用配置直接: ./configure &&make && make install 就可以了

但是有的软件的默认安装配置地址sh: /usr/local/bin,  /usr/local/lib...., 如ntfs-3g的fuse: filesystem in userspace. && ntfs-3g

hpfs/ntfs: high performance fs/ntfs: 高性能fs, 不是惠普fs. ntfs: new technology.. 取代了fat fs, 是综合:fat fs和 hpfs的特点开发的一种文件系统.

disk identifier: =disk signature: 磁盘标志符, 磁盘签名: 是在mbr(master boot record)第一次创建存储时随机产生的. 是Windows系统在启动时用来定位引导devices的,

如果修改disk id将使系统启动失效...

(A Disk Identifier (or Disk Signature) applies to an entire hard disk drive (not a single partition). A Disk Identifier/Disk Signature is a 4-byte (longword) number (0x aa bb cc dd )... that is randomly generated when the Master Boot Record/Partition Table is first created and stored. The Disk Identifier is stored at byte offset 1B8 (hex) through 1BB (hex) in the MBR disk sector. Windows Vista uses the Disk Signature to locate boot devices so changing it can prevent Vista from booting. So far as I know Grub and Linux don't use the Disk Identifier.)

linux不使用disk id, 默认的id都是: 0x 00 00 00 00. 这个disk identifier是可以用程序修改的.

==============================================================

只需要两个包: fuse.xxx.tar.gz, ntfs-3g.xxx.tgz , 然后分别解压, 进入解压目录, 执行: ./configure && make &&make install , 将默认的安装在/usr/local/bin

和/usr/local/lib等目录中, 然后即可使用:

两种方式:

一是:  mount -t ntfs-3g /dev/sda1 /mnt/WinC ....  意,格式必须是: ntfs-3g: 不能是ntfs,

二是: ntfs-3g /dev/sda5 /mnt/WinD  (好像不需要指定 -o iocharset=cp936...) . ntfs-3g命令在 /usr/local/bin目录中...

写在fstab中:

共有6个字段: fs_spec, fs_file, fs_type, fs_options, fs_dump, fs_pass:

fs_spec: 指定将要mount的设备名或标签名或uuid, fs_file: 指定mount的文件挂载点, fs_type: 文件系统的类型 ntfs-3g, ext4,

fs_options: 选项, fs_dump: 指定文件系统是否需要转储, 是=1, 否=0, fs_pass 指定文件系统是否需要在启动时进行检查扫描供fsck:fs check使用 是=1, 否=0

# fs_spec                  fs_file                fs_type     fs_options   fs_dump    fs_pass
# 对于根目录/, /boot, /home, 需要进行转储(用来判断系统和在启动失败崩溃时,将出错信息导出以便于诊断)   和扫描(扫描系统盘或 系统目录)
# 根目录/, 的fs_pass扫描顺序应该=1, 其他等于2,
/dev/mapper/VolGroup-lv_root     /                       ext4    defaults        1 1
UUID=8f7617cd-9957-4ba0-aa7e-85ba17ef3d94 /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_home /home                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/sda1               /mnt/WinC               ntfs-3g   codepage=936,iocharset=gb2312  0  0
/dev/sda5               /mnt/WinD               ntfs-3g   codepage=936,iocharset=gb2312  0  0

原文地址:https://www.cnblogs.com/bkylee/p/4985269.html