Re: does rsync lock the destination file?
From: rc (rc_at_networkz.ch)
Date: 12/05/04
- Previous message: Walter Roberson: "Re: Problem related with Subnetting"
- In reply to: elia Mazzawi: "Re: does rsync lock the destination file?"
- Next in thread: James Antill: "Re: does rsync lock the destination file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 5 Dec 2004 13:06:10 -0800
mazzawi@gmail.com (elia Mazzawi) wrote in message news:<518a5d0.0412031357.6d5cae38@posting.google.com>...
> does rsync send the file over to a temporary file then moves the new
> file to overwrite the old one? if it does then it would be safe to
> assume that an application can never read 1/2 a file while its in
> transit.
hi elia
rsync uses temporary file names, as you can see in this example:
rc@caja:/tmp $ mkdir d1 d2
rc@caja:/tmp $ cd d1/
rc@caja:/tmp/d1 $ dd if=/dev/zero of=test.file bs=1M count=512
512+0 records in
512+0 records out
rc@caja:/tmp/d1 $ rsync test.file /tmp/d2 &
[1] 3800rc@caja:/tmp/d1 $ ls -las ../d2/
...
24832 -rw------- 1 rc users 25427968 Dec 5 21:58 .test.file.1ocy6g
..some time later...
[1]+ Done rsync test.file /tmp/d2
rc@caja:/tmp/d1 $ ls -las ../d2/
...
524288 -rw-r--r-- 1 rc users 536870912 Dec 5 22:00 test.file
best regards
christian ramseyer
- Previous message: Walter Roberson: "Re: Problem related with Subnetting"
- In reply to: elia Mazzawi: "Re: does rsync lock the destination file?"
- Next in thread: James Antill: "Re: does rsync lock the destination file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|