lkml.org 
[lkml]   [2001]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: File copy system call proposal
Daniel Phillips wrote:
> > > Consider the _very_ common case (that nobody has mentioned yet) where you
> > > are editing a large file. When you write to the file, the editor copies
> > > the file to a backup, then immediately truncates the original file and
> > > writes the new data there. What would be _far_ preferrable is to
> > > just
> >
> > Are you sure? I think editor just _moves_ original to backup.
>
> It would be so nice if all editors did that, but most don't according to the
> tests I've done, especially the newer ones like kedit, gnome-edit etc. I
> think this is largely due to developers not knowing why it's good to do it
> this way.

Moving the original to make a backup is a _bad_ thing if the original
might be hard-linked and you'd like all instances to be written to.
OTOH it'a a good thing if you're using hard links for poor man's version
control (`cp -rl'). Hey :)

Emacs does this perfectly with `backup-by-copying-when-linked' (an
option you can change, but I like it on).

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:14    [W:0.108 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site