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