home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / aux / 4014 < prev    next >
Encoding:
Text File  |  1992-11-10  |  2.1 KB  |  43 lines

  1. Newsgroups: comp.unix.aux
  2. Path: sparky!uunet!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!llyene!edgar!leb
  3. From: leb@edgar.Jpl.Nasa.Gov (Larry Bright)
  4. Subject: Re: FTP
  5. Message-ID: <leb.721417631@edgar>
  6. Sender: news@llyene.jpl.nasa.gov
  7. Nntp-Posting-Host: edgar
  8. Organization: Jet Propulsion Laboratory
  9. References: <rRB=ZcB@engin.umich.edu>
  10. Date: Tue, 10 Nov 1992 17:47:11 GMT
  11. Lines: 30
  12.  
  13. rasmussn@engin.umich.edu (Craig E Rasmussen) writes:
  14.  
  15. >I have come across a problem while transferring files using FTP.  I
  16. >wanted to transfer a binary file so I set the type to binary.  Then I
  17. >transferred the file from another UNIX machine to my A/UX Mac.  The
  18. >file comes through okay but the file type is sometimes binary and
  19. >sometimes text on the Mac.  Whether the type is binary or text seems
  20. >to depend on the name of the file, i.e., a particular file will always
  21. >come across as binary or always as text.  What I really need is for the
  22. >file to be binary.  Has anyone come across this before?  Is this a bug?
  23.  
  24. The fundamental reason for this situation is that files transferred from
  25. the Unix machine have no "header" information to unambiguously specify
  26. whether it is binary or text. The finder likes to make a distinction
  27. between the two, but has to either (1) make a fixed assumption for all
  28. files of non-Macintosh origin or (2) try to determine on a case-by-case
  29. basis using some heuristic. Apple impementors chose the latter approach.
  30. (You could call this a bug or a feature, depending on your point of view.)
  31.  
  32. Experimentation shows that the A/UX system looks inside the file and
  33. makes its own best guess as to whether the file is text or binary (for
  34. the purpose of displaying an icon, at least). For example, a file
  35. containing only ascii text can show up with a binary-file icon if the
  36. first line is longer than some maximum (around 200 characters, if memory
  37. serves). There may be other criteria that are applied but I haven't
  38. ferreted them out.
  39.  
  40. Solution: you can force the file to the Apple Double format with 'fcnvt'
  41. and then explicitly set the file type with 'setfile'. See the man pages
  42. for these utilities for details.  Hope this helps.
  43.