Cannot get "keep remote dir up to date" to work properly

Advertisement

Eric
Guest

Cannot get "keep remote dir up to date" to work properly

I am using win2000, and trying to auto sync a directory on a linux system. When I modify a file, I see winspc notice, since it's directory flashes, but it does not copy the file to the other side. Only on the first time will it copy the file.

:shock: It seems the reason is that after a copy, the timestamp in the remote window is wrong, it has the right date, but the time is 12:00 am and this stays like this until I refresh the remote side, when it gets corrected.

After that, it will work one more time, until the time becomes 12:00 again.
:?:

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,426
Location:
Prague, Czechia

Re: Cannot get "keep remote dir up to date" to work properly

Eric wrote:

:shock: It seems the reason is that after a copy, the timestamp in the remote window is wrong, it has the right date, but the time is 12:00 am and this stays like this until I refresh the remote side, when it gets corrected.
Do I understand that you see a "12:00" after you upload the file. But when you refresh the folder the time changes to correct one? Can you post a log file?

And if you use SCP, try SFTP instead. Even if it helps, please post the log file for SCP, I'm interested to see it.
_________________
Martin Prikryl

Reply with quote

Eric
Guest

logging

Below is the log. Also, I can log in to this linux system, and issue "ls" commands. When I do this, I find a strange situation. The file in question, is malloc.c, which does not show up with a time, just a date - in the winSCP log (the second listing, it is correct the first time, as that is after a refresh). However, if I do an "ls -al" to my terminal window, this file does now list with a date.

HOWEVER, there is one file, cmrtest_old, which even with a manual "ls -al" shows up the same way. I don't know why, but if I issue an "ls -al --full-time", then the date and time are both filled in. Strange, I've never seen this before. This is a redhat linux:

Linux version 2.4.18-3smp (Red Hat Linux 7.3 2.96-110)) #1 SMP Thu Apr
18 07:27:31 EDT 2002

Below the log, are two transcripts of a logged in ls -al command, with/without --full-time.

Since the date and time show up correctly with the additional argument, can winscp be setup to use this additional argument, and would it be able to "parse" the results?

If I get a chance, I will try this connected to another linux system.



Getting current directory name.
pwd ; echo "WinSCP: this is end-of-file:$?"
/home/cbs/cmrtest
WinSCP: this is end-of-file:0
Listing current directory.
ls -la ; echo "WinSCP: this is end-of-file:$?"
total 1028
drwxr-xr-x 2 braun cbs 4096 Mar 22 19:15 .
drwxrwxr-x 54 braun cbs 4096 Mar 22 17:49 ..
-rw-r--r-- 1 braun cbs 136 Mar 15 16:25 0readme
-rw-r--r-- 1 braun cbs 88906 Mar 15 16:25 SIMU11.CHK
-rwxrwxrwx 1 braun cbs 15713 Mar 22 14:01 _main.c
-rw-rw-r-- 1 braun cbs 38848 Mar 22 19:15 _main.o
-rwxr-xr-x 1 braun cbs 144 Mar 22 14:10 ccall
-rwxrwxrwx 1 braun cbs 8827 Mar 17 13:00 cmr.c
-rw-rw-r-- 1 braun cbs 24316 Mar 22 19:15 cmr.o
-rwxrwxr-x 1 braun cbs 188324 Mar 22 19:15 cmrtest
-rw-rw-r-- 1 braun cbs 7212 Mar 22 19:15 cmrtest.o
-rwxrwxrwx 1 braun cbs 1826 Mar 17 18:39 cmrtest.sim
-rwxr-xr-x 1 braun cbs 433113 Jan 28 2003 cmrtest_old
-rwxrwxrwx 1 braun cbs 2878 Mar 17 13:00 hrecordf.sim
-rwxrwxrwx 1 braun cbs 7104 Mar 17 13:00 hrestore.sim
-rwxr-xr-x 1 braun cbs 399 Mar 22 14:10 link0
-rwxrwxrwx 1 braun cbs 342 Mar 17 13:16 link1
-rwxrwxrwx 1 braun cbs 15627 Mar 22 19:15 malloc.c
-rw-rw-r-- 1 braun cbs 24952 Mar 22 19:15 malloc.o
-rwxrwxrwx 1 braun cbs 16204 Feb 29 18:35 ne
-rwxrwxrwx 1 braun cbs 3014 Feb 29 18:34 netedit.c
-rwxrwxrwx 1 braun cbs 79567 Mar 17 13:00 preamble.sim
-rw-r--r-- 1 braun cbs 8 Mar 15 16:25 rtlctl.cmr
-rwxrwxrwx 1 braun cbs 6493 Mar 17 13:00 stack.c
-rw-rw-r-- 1 braun cbs 19300 Mar 22 19:15 stack.o
-rw-rw-r-- 1 braun cbs 0 Mar 15 20:21 xxx.xxx
WinSCP: this is end-of-file:0
Copying 1 files/directories to remote directory "/home/cbs/cmrtest"
PrTime: Yes; PrRO: No; Rght: rwxrwxrwx; PrR: Yes; FnCs: N; RIC: Yes; Resume: S (10240); CalcS: Yes; Mask: *.*
TM: M; AscM: *.tcl;*.*htm*; *.txt; *.php*; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex
echo "WinSCP: this is begin-of-file" ; scp -r -p -d -t "/home/cbs/cmrtest" ; echo "WinSCP: this is end-of-file:$?"
WinSCP: this is begin-of-file
SCP remote side confirmation (0)
File: "F:\Documents and Settings\demo\Desktop\cmr\malloc.c"
Copying "F:\Documents and Settings\demo\Desktop\cmr\malloc.c" to remote directory started.
Ascii transfer mode selected.
T1080063216 0 1080028800 0
SCP remote side confirmation (0)
C0777 15627 malloc.c
SCP remote side confirmation (0)
Sending ASCII data (15627d bytes)
Sending NULL.
SCP remote side confirmation (0)
Copying "F:\Documents and Settings\demo\Desktop\cmr\malloc.c" to remote directory finished.
E
SCP remote side confirmation (0)
WinSCP: this is end-of-file:0
Listing current directory.
ls -la ; echo "WinSCP: this is end-of-file:$?"
total 1028
drwxr-xr-x 2 braun cbs 4096 Mar 22 19:15 .
drwxrwxr-x 54 braun cbs 4096 Mar 22 17:49 ..
-rw-r--r-- 1 braun cbs 136 Mar 15 16:25 0readme
-rw-r--r-- 1 braun cbs 88906 Mar 15 16:25 SIMU11.CHK
-rwxrwxrwx 1 braun cbs 15713 Mar 22 14:01 _main.c
-rw-rw-r-- 1 braun cbs 38848 Mar 22 19:15 _main.o
-rwxr-xr-x 1 braun cbs 144 Mar 22 14:10 ccall
-rwxrwxrwx 1 braun cbs 8827 Mar 17 13:00 cmr.c
-rw-rw-r-- 1 braun cbs 24316 Mar 22 19:15 cmr.o
-rwxrwxr-x 1 braun cbs 188324 Mar 22 19:15 cmrtest
-rw-rw-r-- 1 braun cbs 7212 Mar 22 19:15 cmrtest.o
-rwxrwxrwx 1 braun cbs 1826 Mar 17 18:39 cmrtest.sim
-rwxr-xr-x 1 braun cbs 433113 Jan 28 2003 cmrtest_old
-rwxrwxrwx 1 braun cbs 2878 Mar 17 13:00 hrecordf.sim
-rwxrwxrwx 1 braun cbs 7104 Mar 17 13:00 hrestore.sim
-rwxr-xr-x 1 braun cbs 399 Mar 22 14:10 link0
-rwxrwxrwx 1 braun cbs 342 Mar 17 13:16 link1
-rwxrwxrwx 1 braun cbs 15627 Mar 23 2004 malloc.c
-rw-rw-r-- 1 braun cbs 24952 Mar 22 19:15 malloc.o
-rwxrwxrwx 1 braun cbs 16204 Feb 29 18:35 ne
-rwxrwxrwx 1 braun cbs 3014 Feb 29 18:34 netedit.c
-rwxrwxrwx 1 braun cbs 79567 Mar 17 13:00 preamble.sim
-rw-r--r-- 1 braun cbs 8 Mar 15 16:25 rtlctl.cmr
-rwxrwxrwx 1 braun cbs 6493 Mar 17 13:00 stack.c
-rw-rw-r-- 1 braun cbs 19300 Mar 22 19:15 stack.o
-rw-rw-r-- 1 braun cbs 0 Mar 15 20:21 xxx.xxx
WinSCP: this is end-of-file:0




[1008]$ ls -al --full-time
total 1028
drwxr-xr-x 2 braun cbs 4096 Mon Mar 22 19:15:14 2004 .
drwxrwxr-x 54 braun cbs 4096 Mon Mar 22 17:49:47 2004 ..
-rw-r--r-- 1 braun cbs 136 Mon Mar 15 16:25:15 2004 0readme
-rwxr-xr-x 1 braun cbs 144 Mon Mar 22 14:10:30 2004 ccall
-rwxrwxrwx 1 braun cbs 8827 Wed Mar 17 13:00:28 2004 cmr.c
-rw-rw-r-- 1 braun cbs 24316 Mon Mar 22 19:15:14 2004 cmr.o
-rwxrwxr-x 1 braun cbs 188324 Mon Mar 22 19:15:15 2004 cmrtest
-rw-rw-r-- 1 braun cbs 7212 Mon Mar 22 19:15:14 2004 cmrtest.o
-rwxr-xr-x 1 braun cbs 433113 Tue Jan 28 14:41:55 2003 cmrtest_old
-rwxrwxrwx 1 braun cbs 1826 Wed Mar 17 18:39:02 2004 cmrtest.sim
-rwxrwxrwx 1 braun cbs 2878 Wed Mar 17 13:00:28 2004 hrecordf.sim
-rwxrwxrwx 1 braun cbs 7104 Wed Mar 17 13:00:28 2004 hrestore.sim
-rwxr-xr-x 1 braun cbs 399 Mon Mar 22 14:10:48 2004 link0
-rwxrwxrwx 1 braun cbs 342 Wed Mar 17 13:16:12 2004 link1
-rwxrwxrwx 1 braun cbs 15713 Mon Mar 22 14:01:00 2004 _main.c
-rw-rw-r-- 1 braun cbs 38848 Mon Mar 22 19:15:14 2004 _main.o
-rwxrwxrwx 1 braun cbs 15627 Tue Mar 23 09:33:36 2004 malloc.c
-rw-rw-r-- 1 braun cbs 24952 Mon Mar 22 19:15:14 2004 malloc.o
-rwxrwxrwx 1 braun cbs 16204 Sun Feb 29 18:35:10 2004 ne
-rwxrwxrwx 1 braun cbs 3014 Sun Feb 29 18:34:58 2004 netedit.c
-rwxrwxrwx 1 braun cbs 79567 Wed Mar 17 13:00:30 2004 preamble.sim
-rw-r--r-- 1 braun cbs 8 Mon Mar 15 16:25:26 2004 rtlctl.cmr
-rw-r--r-- 1 braun cbs 88906 Mon Mar 15 16:25:33 2004 SIMU11.CHK
-rwxrwxrwx 1 braun cbs 6493 Wed Mar 17 13:00:30 2004 stack.c
-rw-rw-r-- 1 braun cbs 19300 Mon Mar 22 19:15:14 2004 stack.o
-rw-rw-r-- 1 braun cbs 0 Mon Mar 15 20:21:10 2004 xxx.xxx



[1009]$ ls -al
total 1028
drwxr-xr-x 2 braun cbs 4096 Mar 22 19:15 .
drwxrwxr-x 54 braun cbs 4096 Mar 22 17:49 ..
-rw-r--r-- 1 braun cbs 136 Mar 15 16:25 0readme
-rwxr-xr-x 1 braun cbs 144 Mar 22 14:10 ccall
-rwxrwxrwx 1 braun cbs 8827 Mar 17 13:00 cmr.c
-rw-rw-r-- 1 braun cbs 24316 Mar 22 19:15 cmr.o
-rwxrwxr-x 1 braun cbs 188324 Mar 22 19:15 cmrtest
-rw-rw-r-- 1 braun cbs 7212 Mar 22 19:15 cmrtest.o
-rwxr-xr-x 1 braun cbs 433113 Jan 28 2003 cmrtest_old
-rwxrwxrwx 1 braun cbs 1826 Mar 17 18:39 cmrtest.sim
-rwxrwxrwx 1 braun cbs 2878 Mar 17 13:00 hrecordf.sim
-rwxrwxrwx 1 braun cbs 7104 Mar 17 13:00 hrestore.sim
-rwxr-xr-x 1 braun cbs 399 Mar 22 14:10 link0
-rwxrwxrwx 1 braun cbs 342 Mar 17 13:16 link1
-rwxrwxrwx 1 braun cbs 15713 Mar 22 14:01 _main.c
-rw-rw-r-- 1 braun cbs 38848 Mar 22 19:15 _main.o
-rwxrwxrwx 1 braun cbs 15627 Mar 23 09:33 malloc.c
-rw-rw-r-- 1 braun cbs 24952 Mar 22 19:15 malloc.o
-rwxrwxrwx 1 braun cbs 16204 Feb 29 18:35 ne
-rwxrwxrwx 1 braun cbs 3014 Feb 29 18:34 netedit.c
-rwxrwxrwx 1 braun cbs 79567 Mar 17 13:00 preamble.sim
-rw-r--r-- 1 braun cbs 8 Mar 15 16:25 rtlctl.cmr
-rw-r--r-- 1 braun cbs 88906 Mar 15 16:25 SIMU11.CHK
-rwxrwxrwx 1 braun cbs 6493 Mar 17 13:00 stack.c
-rw-rw-r-- 1 braun cbs 19300 Mar 22 19:15 stack.o
-rw-rw-r-- 1 braun cbs 0 Mar 15 20:21 xxx.xxx

Reply with quote

Eric
Guest

Using sftp seems to get it to work now.

However, sometimes, even if I see the correct time in the remote file, I found it would not update until the difference in times was 1 minute - however, I cannot reliably repeat that.

Reply with quote

Eric
Guest

loses a sync if the last timestamp 0 seconds and less than 1 minute has elapsed

Eric wrote:


However, sometimes, even if I see the correct time in the remote file, I found it would not update until the difference in times was 1 minute - however, I cannot reliably repeat that.

I think I can repeat this. It occurs when the timestamp is on an exact minute (zero seconds).

At this point, if I wait 1 minute, it will begin working again. But anytime the local timestamp is an exact minute (and so the remote is set to that time), then no more transfers will occur until one minute goes by and the file changes again.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,426
Location:
Prague, Czechia

Re: loses a sync if the last timestamp 0 seconds and less than 1 minute has elapsed

Eric wrote:

At this point, if I wait 1 minute, it will begin working again. But anytime the local timestamp is an exact minute (and so the remote is set to that time), then no more transfers will occur until one minute goes by and the file changes again.
I know of this limitation. I can try to solve it somehow.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum