... how do you copy in/out from HFS disks?

Hernan'Jackie' Macapanpan jackie at Apple.COM
Fri May 6 02:41:01 AEST 1988


In article <991 at usfvax2.EDU>, pollock at usfvax2.EDU (Wayne Pollock) writes:
> How can an AU/X application use a file (say a TEXT file) created under
> the Mac OS (i.e., HFS)?  How can a Mac OS application access a
> file created under AU/X?)

The following info is taken from the  A/UX Toolbox: Macintosh ROM Interface
manual.

The A/UX Toolbox makes it possible to manipulate the same text files from both
Macintosh applications and standard A/UX programs. The following describes
the different conventions the two systems use and explanins how to convert
text files when moving between the two.

A text file created by a Macintosh application (such as MacWrite)
has these attributes:
	- Lines are terminated by returns (ASCII 0x0D)
	- The data file is accompanied by a resource file containing the type
	  and creator. The resource file has the same name as the text file,
	  with the extension '.res'. The file type is 'TEXT' and the creator
	  varies with the application.

A file created by an A/UX program (such as vi(1)) has these attributes:
	- Lines are terminated by line feeds (ASCII 0x0A)
	- The text file has no associated resource file. When a Macintosh
	  application running under A/UX finds no resource file, it assigns
	  the file a type and creator of 'A/UX'. Most Macintosh applications
	  open a file only if they recognize the file type.

You can use the tr(1) command to convert the newline characters between the
two conventions, and the settc(1) utility to establish or change a file's
type and creator.

To convert an A/UX text file for use with a Macintosh application, use these
tow commands:
	tr \\012 \\015 < {source-file} > {destination-file}
	settc TEXT A/UX {destination-file}

To convert a Macintosh text file for use with an A/UX program, use this command:
	tr \\015 \\012 < {source-file} > {destination-file}

> I've heard that a disk can not be used for both AU/X (or is it A/UX? Hmm) and
> HFS at the same time (obviously the same disk partition can't be - these are
> different file systems); is this true?

The hard disk that A/UX is currently distributed on contains both Macintosh OS
and A/UX partitions. I also have an external 80SC that has a 20MB Macintosh OS
partition and a 60MB A/UX partition. I use the 20MB under Macintosh OS and the
60MB under A/UX.

> I really need to know what kind of hard disk to buy with the Mac II! Do I
> need to buy two hard disks, one for AU/X and one for HFS?  Are certain brands
> of hard disks recommended/discouraged?  Whats the bottom line here?

There's about, oh darn I can't remember, about 6 to 9MB of available disk space 
on the A/UX partition fresh out of the box. The Macintosh partition is about
2MB. So, a second drive wouldn't hurt. Ofcourse, I recommend Apple hard drives.
Apple hard drives have been tested throughly under A/UX. I've heard that others
have used non-Apple drives with success but the installation process may not
be trivial.

> With AU/X, can I use third party 19" color monitors?  (I wouldn't want to
> buy one such as the PCPC one only to find out AU/X can't access it.)

Make sure that the monitor has a compatible NuBus video card that allows it
to function under A/UX.

> Finally, are any keyboards recommended/discouraged (I don't think so, but as
> long as I'm asking I might as well be thorough)?

I use both the standard and extended keyboards under A/UX (sometimes at the
same time! I know, strange). I've also used the DataDesk Mac-101 keyboard and
that seems to work just fine under A/UX also.

Hope this all helps.

----------------------------------------------------------------------------
 Disclaimer: I works heres, buts theys don'ts knows I's cans types. :-)
	Whats I's says iss nots necessarilys whats mys employers says. :-(

Hernan 'Jackie' Macapanpan			      amdahl \
Technical Communications/A/UX Hotline		  pyramid!sun - apple!jackie
Apple Computer, Inc. (408) 996-1010		      decwrl /
----------------------------------------------------------------------------



More information about the Comp.unix.aux mailing list