KUNARC(1) K-AShare by Xinet (10/14/99 10.1) KUNARC(1)
NAME [Toc] [Back]
kunarc, karc - K-AShare
AppleSingle/AppleDouble/BinHex/MacBinary converter
SYNOPSIS [Toc] [Back]
kunarc [ -trU ] [ -f outfile ] infile...
karc [ -trACDM ] [ -f outfile ] infile...
DESCRIPTION [Toc] [Back]
These utility programs let the user convert between various
Macintosh archival formats and the K-AShare file format.
The supported archive formats are AppleSingle, AppleDouble,
BinHex, CAP-AUFS 3.0, Helios Ethershare, MacBinary, TOPS
(version 2 or later), and IPT uShare 4.1. These formats are
used to encode Macintosh specific information (file type and
creator, resource fork etc.) into one or more files that
can be stored on non-Macintosh file systems. BinHex also
encodes files into ASCII, so that they can be transferred
via e-mail (i.e. it is similar to uuencode(1) ). AppleDouble
is used by some other AppleShare emulators to store
Macintosh files on Unix filesystems (e.g. A/UX, GatorShare,
and NFS/Share). AppleSingle is used by AppleLink to attach
files to e-mail messages.
Karc creates archive files from K-AShare files, kunarc
creates K-AShare files from archive files.
BinHex files usually have a .hqx file suffix. AppleDouble
format uses two files. For instance, for a file named foo,
only the macintosh data fork will be stored in the file
named foo. The resource fork, file creator, type,
modification date, etc. are stored in a file named %foo.
Kunarc should be run on the file that starts with the '%'
character.
Helios Ethershare and IPT uShare files have a .rsrc
subdirectory which contains the resource fork of the file
contained in the upper directory. Helios Ethershare files
with no dataforks only have an entry in this .rsrc
subdirectory. Using kunarc on IPT uShare requires using the
-U option. kunarc should be run given the name of the .rsrc
subdirectory, and will then convert all files in the
subdirectory. A side effect of running kunarc on Helios
Ethershare and IPT uShare files is that filenames with 8 bit
characters (accents and the like) will get renamed using
Xinet's 8 bit character mapping.
Helios EtherShare and IPT uShare file systems should also
have their directory names changed using kunarc with the -h
option. See the examples.
MacBinary files usually have a .bin suffix. The kunarc
Page 1 (printed 5/4/100)
KUNARC(1) K-AShare by Xinet (10/14/99 10.1) KUNARC(1)
utility supports BinHex 4.0 and MacBinary I & II files. Note
that AppleSingle files received from AppleLink via UNIX mail
must be run through uudecode first. Kunarc does support
compressed AppleLink enclosures, but the AppleLink software
or Stuffit Expander must be used to uncompress the resulting
file.
Kunarc will use the file name recorded in the archive file,
for every infile that is not preceded by an outfile
argument.
If you don't use the remove infile option with karc, you
must specify an outfile.
OPTIONS [Toc] [Back]
-f Use the next argument as the name of outfile. If
outfile does not contain a path name, the current
working directory will be used (rather than any path
name that may be contained in infile). If this option
is omitted, we try to determine the output filename
from infile (and outfile will be placed in the same
directory as infile). If outfile is given as `-', karc
writes to the standard output.
-r Remove infile after converting it.
-h Convert infile Helios EtherShare or IPT uShare
directory names, and all subdirectory names, to use
Xinet's 8 bit character encoding scheme. This option
should be run by itself either before or after
converting all the files from Helios EtherShare or IPT
uShare format to Xinet format. See the examples below.
-t Set the tolerant flag. When this flag is set, kunarc
tries to handle apparently invalid files. This is
useful for handling files created by programs that do
not exactly follow the appropriate file format
standard.
-A Create an AppleSingle archive.
-B Force translation of a BinHex archive.
-C Create a CAP/AUFS version 3 archive.
-D Create an AppleDouble archive.
-M Create a MacBinary archive.
-U Assume input infile is a IPT uShare file (uShare files
are not automatically recognized as they lack an easy
"magic" number to recognize).
Page 2 (printed 5/4/100)
KUNARC(1) K-AShare by Xinet (10/14/99 10.1) KUNARC(1)
infile
This may be a directory (in which case all regular
files in infile are processed).
FILES [Toc] [Back]
./.HSancillary File for additional file
information needed by
Macintosh.
EXAMPLES [Toc] [Back]
Kunarc can be run in batch mode in conjunction with find.
(You should run kunarc as root if you use this method). If
you are doing this, we suggest piping stdout into a log file
so you can look at stderr for any errors. If you don't have
a backup of your filesystem, we suggest you don't use the
remove option if you use kunarc in batch mode. Instead, you
can use another find command to remove the archive files
once kunarc has been run successfully. (See examples below).
Convert all AppleDouble files in the directory tree rooted
at /usr/mount to K-AShare format:
find /usr/mount -name "%*" -exec kunarc {} \;
Convert all A/UX files in the directory tree rooted at
/usr/mount to K-AShare format:
find /usr/mount -type d -name ".AppleDouble" -prune -exec kunarc {} \;
If this succeeds without incident, use the following commands to remove
the A/UX directories (which will no longer be necessary).
find . -name ".AppleDouble" -prune -exec rm -r {} \;
Convert all CAP-AUFS files in the directory tree rooted at
/usr/mount to K-AShare format:
find /usr/mount -type d -name ".finderinfo" -prune -exec kunarc {} \;
If this succeeds without incident, use the following commands to remove
the CAP directories (which will no longer be necessary).
find . -name ".finderinfo" -prune -exec rm -r {} \;
find . -name ".resource" -prune -exec rm -r {} \;
Convert all TOPS files in the directory tree rooted at
/usr/mount to K-AShare format:
find . -name ".rsrc" -prune -o -type f -exec kunarc {} \;
If this succeeds without incident, use the following commands to remove
the TOPS directories (which will no longer be necessary).
Page 3 (printed 5/4/100)
KUNARC(1) K-AShare by Xinet (10/14/99 10.1) KUNARC(1)
find . -name ".rsrc" -exec rm -rf {} \;
Convert all Helios EtherShare files in the directory tree
rooted at /usr/mount to K-AShare format:
find . -name ".rsrc" -type d -exec kunarc {} \;
Convert all IPT uShare files in the directory tree rooted at
/usr/mount
to K-AShare format:
find . -name ".rsrc" -type d -exec kunarc -U {} \;
You also need to change the directory names from Helios'
or IPT's 8 bit character encoding scheme to Xinet's encoding scheme.
This has to be done as a separate step as the find command gets confused
when directories being searched change names. Run kunarc with
the -h flag at the root of the Helios EtherShare or IPT uShare
directory tree:
kunarc -h /usr/mount
If all this succeeds without incident, use the following commands
to remove the EtherShare or uShare directories (which will no longer
be necessary).
find . -name ".rsrc" -type d -exec rm -rf {} \;
Convert all K-AShare files in the directory tree rooted at
/usr/mount to AppleDouble format (type as one line):
find /usr/mount \( -type d -name ".HSResource" -prune \)
-o \( -name ".HSancillary" \)
-o -type f -exec karc -D -r {} \;
Convert AMacFile into uu, which can be appended to messages
sent to AppleLink accounts via the Internet AppleLink
gateway (e.g. XINET@applelink.apple.com). AppleLink will
convert the enclosure back to the original Macintosh file.
karc -A -f - AMacFile | uuencode AMacFile >! uu
SEE ALSO [Toc] [Back]
K-AShare Administrator's Guide
BUGS [Toc] [Back]
The tolerant flag does not always work.
If kunarc is used in conjunction with find(1) and the remove
flag is on, find may be confused when kunarc deletes files.
This will result in spurious error messages (usually
something like "cannot stat <filename>"), which may be
Page 4 (printed 5/4/100)
KUNARC(1) K-AShare by Xinet (10/14/99 10.1) KUNARC(1)
ignored.
kunarc doesnt do the right thing when given the dataforks
for Helios EtherShare and IPT uShare files. Give it the
file in the .rsrc directories.
Karc supports only MacBinary, AppleSingle and AppleDouble.
Page 5 (printed 5/4/100)
[ Back ]
|