xrdcp should specify kXR_delete when opening the target file. That will delete the file prior to writing it. It should do so only on the first open.. This is because after a reconnect to a server during error recovery the copy resumes where it left off. So, deleting the file would be inappropriate. It's a tricky but that's how it should work. I looks like that is not what it does. Andy ----- Original Message ----- From: "Wilko Kroeger" <[log in to unmask]> To: "Gregory Schott" <[log in to unmask]> Cc: "xrootd mailing list" <[log in to unmask]> Sent: Wednesday, June 29, 2005 9:22 AM Subject: Re: is this a bug? > > Hello > > I just checked the xrdcp behavior in release 20050623-0016 > and i see the same behavior that Gregory sees. Is it expected that > a previous file is not delete before the new one is written, even if > the force option is not used? > > Cheers, > Wilko > > > On Wed, 29 Jun 2005, Wilko Kroeger wrote: > >> >> Hello Gregory >> >> In the older xrdcp versions the force option is used to write a file. In >> this case a previously existing file is not deleted before the new file >> is written. If the new file is shorter then the old file the file in >> xrootd will consist of the new file in the beginning and the old file in >> the end. >> >> Cheers, >> Wilko >> >> >> On Wed, 29 Jun 2005, Gregory Schott wrote: >> >> > Hello, >> > >> > With a test at GridKa doing a simple copy of a text file I seem >> > something >> > strange. The script I use is: >> > >> > setenv XRDPATH $BFROOT/package/xrootd/20050623-0016 >> > setenv LD_LIBRARY_PATH $XRDPATH/lib/i386_rhel30 >> > rm -rf toto.txt2 >> > echo "THIS IS A TEST 2" >! toto.txt >> > $XRDPATH/bin/i386_rhel30/xrdcp -DIDebugLevel 0 toto.txt >> > root://f01-014-106.gridka.de:1094//prod/ >> > $XRDPATH/bin/i386_rhel30/xrdcp -DIDebugLevel 0 >> > root://f01-014-106.gridka.de:1094//prod/toto.txt toto.txt2 >> > cat toto.txt2 >> > rm -rf toto.txt2 >> > echo "ANOTHER TEST" >! toto.txt >> > $XRDPATH/bin/i386_rhel30/xrdcp -DIDebugLevel 0 toto.txt >> > root://f01-014-106.gridka.de:1094//prod/ >> > $XRDPATH/bin/i386_rhel30/xrdcp -DIDebugLevel 0 >> > root://f01-014-106.gridka.de:1094//prod/toto.txt toto.txt2 >> > cat toto.txt2 >> > >> > And I get: >> > >> > Overriding 'DebugLevel' with value 0. Final value: 0 >> > 050629 12:22:59 001 Xrd: main: (C) 2004 SLAC INFN xrdcp 0.2 beta >> > 050629 12:22:59 001 Xrd: Create: (C) 2004 SLAC INFN XrdClient 0.3 >> > [xrootd] Total 0.00 MB |====================| 100.00 % [0.0 Mb/s] >> > Overriding 'DebugLevel' with value 0. Final value: 0 >> > 050629 12:22:59 001 Xrd: main: (C) 2004 SLAC INFN xrdcp 0.2 beta >> > 050629 12:22:59 001 Xrd: Create: (C) 2004 SLAC INFN XrdClient 0.3 >> > [xrootd] Total 0.00 MB |====================| 100.00 % [0.0 Mb/s] >> > THIS IS A TEST 2 >> > Overriding 'DebugLevel' with value 0. Final value: 0 >> > 050629 12:23:00 001 Xrd: main: (C) 2004 SLAC INFN xrdcp 0.2 beta >> > 050629 12:23:00 001 Xrd: Create: (C) 2004 SLAC INFN XrdClient 0.3 >> > [xrootd] Total 0.00 MB |====================| 100.00 % [0.0 Mb/s] >> > Overriding 'DebugLevel' with value 0. Final value: 0 >> > 050629 12:23:00 001 Xrd: main: (C) 2004 SLAC INFN xrdcp 0.2 beta >> > 050629 12:23:00 001 Xrd: Create: (C) 2004 SLAC INFN XrdClient 0.3 >> > [xrootd] Total 0.00 MB |====================| 100.00 % [0.0 Mb/s] >> > ANOTHER TEST >> > T 2 >> > >> > Namely, the text file gets corrupted if there is already another >> > previous and different version on the server. Is that a bug, or am I >> > mishandling xrootd? >> > >> > Cheers, >> > Gregory >> > >> >