Navigation:

Documentation:

Other:

Link Collection:

~~CLOUD:30~~

The Text Editor Pitfall

The current kernel_driver allows overwriting existing files. People hear about it and say: Hey, I can edit 'foo.txt' with vim/emacs/whatever and fail. Why can't they save the file?

When a common text editor saves a file, it actually tries to create a temporary file, save the contents and rename it over the original file. It is done for reasons like integrity.

Naturally, creating another file is not supported and the save fails.

Some editors (like vim) used to fail due to trying to truncate the file and then extending it. which were unsupported operations too before NTFS release 2.1.25 (linux kernel 2.6.15+). vim and Openoffice.org writer are known to work fine now with small files.

Similar cases

Changing the ID3v2 tag of an MP3 that is stored on an NTFS partition. (ID3v1 can be done in-place, and thus is not affected)

What can you do

Use dd or some hexeditor instead.

Use ntfsmount, as it has more features that the kernel kernel_driver, including creation of new files.

 
texteditorpitfall.txt · Last modified: 2009/02/09 21:32 (external edit)