Mail Archives: cygwin/2004/02/20/02:51:22
On Fri, Feb 20, 2004 at 10:02:03AM +0300, Egor Duda wrote:
> huh? what do you mean "in-place"? linux writes new file to new place, it
> just deletes .bak file afterwards, unlike cygwin.
>
> deo AT paltus:~$ echo aaa >xxx
> deo AT paltus:~$ ls -i xxx
> 408096 xxx
> deo AT paltus:~$ perl -i -pe 's/aaa/bbbb/' xxx
> deo AT paltus:~$ ls -i xxx
> 408074 xxx
> deo AT paltus:~$ cat xxx
> bbbb
That doesn't ever create a backup file or a temporary file. It opens
xxx for read, unlinks it, opens xxx for writing, then reads from the
original handle and writes to the second handle. This is AFAIUI
impossible on windows, but possible on things like unix and VMS (where
the unlink is skipped because of the automatic versioning).
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -