[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: What is the difference between cat and vim command to file system?



Thank you !

when use vim command the block number will change. but when use echo "something" > a file. the block number will not change.

zsk zsk-laptop:~$ sudo filefrag -v a
Checking a
Filesystem type is: ef53
Filesystem cylinder groups is approximately 104
Blocksize of file a is 4096
File size of a is 13 (1 blocks)
First block: 3013938
Last block: 3013938
a: 1 extent found
zsk zsk-laptop:~$ cat a
hello,world!
zsk zsk-laptop:~$ vim a
zsk zsk-laptop:~$ cat a
hi,hello,world!
zsk zsk-laptop:~$ sudo filefrag -v a
Checking a
Filesystem type is: ef53
Filesystem cylinder groups is approximately 104
Blocksize of file a is 4096
File size of a is 16 (1 blocks)
First block: 3013924
Last block: 3013924
a: 1 extent found


2009/6/10 Stephen Samuel (gmail) <darkonc gmail com>
an example test case might be useful.
I'm not clear what you're trying to do, or what the problem is.

On Tue, Jun 9, 2009 at 10:40 PM, Sucan Zhang <bitzsk gmail com> wrote:
Hi,

why use cat command to edit a file , the blocks of the file will not change.

but use vim command to edit a file, the blocks of the file will change?

Thanks in advance!

--
Regards,
Sucan

_______________________________________________
Ext3-users mailing list
Ext3-users redhat com
https://www.redhat.com/mailman/listinfo/ext3-users



--
Stephen Samuel http://www.bcgreen.com  Software, like love,
778-861-7641                              grows when you give it away



--
Regards,
Sucan

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]