1847342 Members
2191 Online
110264 Solutions
New Discussion

Werid Copy Problem

 
Sharon Bi
Frequent Advisor

Werid Copy Problem

Dear all,

Scenerio:

There is a cron job running on a NT box. It copies over some reports files ( they are ASCII files) to another NT box first, then copies them to an HP A180C as well. ( The mount point on this UX server is NFS mounted to the NT box. And they just simply issue a "copy" command).

The copy on the other NT box is OK. But the copy to the UNIX box are corrupted. If you open it up using MS WordPad, you can see the files are being chopped. And these two copied are exactly the same size!!! (which is 2554652Bytes).

I ftp the good file to my Unix box and did a "diff" on the two files. It shows:

Warning: missing newline at end of file file1.txt
Warning: missing newline at end of file file2.txt
...

and then pages and pages of differences.

This cron job on the NT box has been running successfully for months. Could any body tell me what are the possible cause of the problem?

( I also did a lvdisplay on that mount point. No "stale" showing up.)

Thank you very much and happy holidays!!

Sharon




3 REPLIES 3
Victor BERRIDGE
Honored Contributor

Re: Werid Copy Problem

Hi Sharon,
Did you dos2ux your file on the ux box?
I've seen cases where the files (word and .csv files) were truncated and found out it was in relation with the way windoz manages its fs in NFS (using cache) if the file exited already in you change the file without NT refresh it gives you the new file but with the size it remembers (old)...
But here it looks more like a conversion problem so dos2ux or the otherway round depending...

Good luck
all the best

Victor
Anthony Goonetilleke
Esteemed Contributor

Re: Werid Copy Problem

Ascii formats on Unix and PC's are different.
when you use ftp and set the type to ascii it translates the formats. What you are probably doing is translating it to unix copying and then trying to look at it from a pC and hence the differences. What does the script actually do?
Minimum effort maximum output!
Sharon Bi
Frequent Advisor

Re: Werid Copy Problem

The script is as follows:

copy %1 \\tonis120\tonis120\data\ftp\reports\rimms\%2.tmp

copy %1 c:\spool\%2.tmp

( tonis120 is a unix box)

But this script was running fine for the last serveral months. And there's no change in the format of the files.

Is there any possibility that this is network related or any other solutions?

Thanks for your time and effort.