Moving open files

Smoot Carl-Mitchell smoot at tic.com
Mon Jul 7 14:02:35 UTC 2008


On Mon, 2008-07-07 at 14:56 +0300, Dotan Cohen wrote:
> A user recently found that Ubuntu has a dataloss danger when moving
> open files. To confirm:
> 1) Open file in OOo.
> 2) Move file to other location.
> 3) Make changes to file in OOo.
> 4) Save file in OOo.
> 
> Who's responsibility is it to make sure that files in use are either
> not moved, or that saves to the file are performed on the file's new
> location? Is this the responsibility of OOo, KDE, or the Linux kernel?

In Unix/Linux systems, it has generally been the application's
responsibility to handle file locking and sharing.  In general the
standard utilities (e.g. mv, cp) do not lock files.  There are hooks for
file locking (flock, fcntl), but all locking is advisory.

-- 
Smoot Carl-Mitchell
System/Network Architect
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list