.\" $Id: hfs.1,v 1.5 1994/07/02 06:19:18 craigs Exp $ .\" $Log: hfs.1,v $ .\" Revision 1.5 1994/07/02 06:19:18 craigs .\" Added extra information .\" .\" Revision 1.4 1994/06/30 14:39:24 craigs .\" Changes for bigger blocks and partitions .\" .\" Revision 1.3 1994/01/11 02:21:35 craigs .\" Fixed problems with cat help and changed to version 0.3 .\" .\" Revision 1.2 1994/01/06 03:10:52 craigs .\" Added comment about usage messages .\" .\" Revision 1.1 1994/01/06 03:05:42 craigs .\" Initial revision .\" .\" .TH HFS 1 "26 June 1994" .SH NAME hfs \- program for accessing Macintosh HFS floppy disks .SH SYNOPSIS .B hfs .BI ls [ .BI \-laR ] .BI filespec .br .B hfs .BI dir filespec .br .B hfs .BI cd directory .br .B hfs .BI pwd .br .B hfs .BI read [ .BI \-tMR ] hfsspec ... native_file .br .B hfs .BI cat [ .BI \-txR ] filename .br .B hfs .BI part [ .BI \-a ] .SH DESCRIPTION .I hfs provides a command line interface to suite of functions for accessing Macintosh HFS floppy disks, hard drives and CD-ROMS. The following functions are available: .TP 30 \- display a directory listing (ls, dir) .TP 30 \- change directories (cd) .TP 30 \- display the name of the current directory (pwd) .TP 30 \- copy an HFS file into a local file (read) .TP 30 \- display the contents of an HFS file (cat) .TP 30 \- display the partition table on a Macintosh volume. .TP 0 Functions may be invoked by specifiying the function name on the command line followed by any parameters. Alternatively, the executable can be copied or linked to an alternate name which can then be used to invoke the function directly. The alternate names recognised by .B hfs are .B hls, .B hdir, .B hcd, .B hpwd, .B hpart, .B hread and .B hcat. The current directory and volume name as detected by .I hfs are stored in a .B status file. This allows .I hfs to maintain the current directory between invocations and to reset this directory whenever the volume is changed. .I hfs defaults to using the A: floppy drive. This can be overridden by specifying a filename or device via the .I HFS_DEVICE environment variable or the \-d command line option. The format of device names differs depending upon the operating system. Regardless of the operating system, the special device names .I A: and .I B: map to the two floppy drives. The devices used are .I /dev/fd0H1440 and .I /dev/fd1H1440 for Linux, .I A: and .I B: for MS-DOS, .I \\\\\\\\.\\\\A: and .I \\\\\\\\.\\\\B: for Windows NT, and .I /dev/rfd0.1440 and .I /dev/rfd1.1440 for FreeBSD. Note that the device used by .hfs does not have to be floppy drive. It can just as easily be the name of the CD-ROM device, a normal file or any other accessible device. For instance, to access a CD-ROM, set the device to /dev/sr0 (Linux) or to F: (say) for MS-DOS. All paths specified on the HFS volume assume that the colon (":") character is the directory separator character. The dot (".") character may be used to indicate the current directory, and the double-dot ("..") sequence may be used to indicate the parent directory. Filename globbing accepts the standard Unix wildcard conventions. The current version of .B hfstools is 0.37 .SH PARTITIONS .I hfs can access standard Macintosh partitioned media. Normally the first HFS partition on the device will be used. If more than one HFS partition exists, then the first partition will still be used, but a warning message will be printed every time .I hfs is invoked. If the .B HFS_PARTITION environment variable or the \-p option is used to specify the partition number, then this warning is supressed. If the partition specified, but is not an HFS partition, then a warning message will be displayed and the the first HFS partition following will be used. Use the command .I hfs part to display all of the HFS partitions on a device. The \-a option can be used to display all partitions regardless of type. .SH OPTIONS .TP .B \-a display all files, including invisible ones. For the .I part command, display all partition table entries. .TP .B \-d filename use .I filename as the HFS device. Note that this may be a real file, or a device. .TP .B \-l display file information in long format .TP .B \-p number Use the specified partition number on the current device. This overrides the value (if any) of the HFS_PARTITION environment variable. .TP .B \-t convert Macintosh end\-of\-line characters (linefeeds) to the end\-of\-line sequence appropriate for the host operating system, and convert Macintosh characters to the ISO Latin1 character set. .TP .B \-x display the file in hex. .TP .B \-R for the .I ls command, display sub directories recursively. For the .I read and .I cat commands, use the resource fork rather than the data fork. .TP .B \-M Do not attempt to mangle the filenames to be legal for the native operating system. .SH ENVIRONMENT .TP 15 .SB HFS_DEVICE Specifies the name of the device used to access the floppy drive. .TP 15 .SB HFS_PARTITION Specifies the number of the partition to use on Macintosh partitioned devices. .TP 15 .SB HFS_STATUSFILE Gives the path and name of the status file used to detect volume changes and the hold the current directory between invocations. .TP 15 .SB TEMP For MS-DOS and NT, specifies the directory to store the status file .SH FILES .TP 15 .SB ~/.macdir Default status file for Unix systems .TP 15 .SB ./macdir.sts Default status file for MSDOS and NT systems if no TEMP environment variable set. .TP 15 .SB $(TEMP)/.macdir.sts Default status file for MSDOS and NT systems if TEMP environment variable is set. .TP 15 .SB /dev/fd0H1440, /dev/fd1H1440 Floppy disk devices for Linux .TP 15 .SB /dev/rfd0.1440, /dev/rfd1.1440 Floppy disk devices for FreeBSD .TP 15 .SB \\\\\\\\.\\\\A:, \\\\\\\\.\\\\B: Floppy disk devices for Windows/NT .SH BUGS No functions for writing to the disk at the file level have yet been implemented. Wildcard expansion of HFS filenames has been implemented for the .B hread command, but not for any other commands. This would be especially useful when entering ISO Latin1 filenames. The usage messages need more work. There is no support for the AppleDouble format. There is no support for MFS disks, and there is probably no need to as there will never be any support for 800K disks. .SH CREDITS .I hfs was originally written by Craig Southeren (craigs@ineluki.apana.org.au). MS-DOS/Windows/NT code, extensive testing and debugging, and C++ coaching by Robert Jongbloed. Thanks to Jean-Marc Zucconi (jmz@cabri.obs-besancon.fr) for the code and help in getting partitioned drives and CD-ROMS working, and for the idea of ISO Latin1 conversion. Thanks to Rich Murphey (rich@lamprey.utmb.edu) for the FreeBSD patches.