PCCOPY(1) COMMAND REFERENCE PCCOPY(1)
NAME
pccopy - copy files between UTek and PC-DOS filesystems
SYNOPSIS
pccopy [ -ab ] [ -cpu ] [ -h ] [ -v ] [ -w ] file1 file2
pccopy [ -ab ] [ -cpu ] [ -h ] [ -v ] [ -w ] file ...
directory
DESCRIPTION
File1 is copied onto file2.
In the second form, one or more files are copied into the
directory with their original filenames.
The mode and owner of files copied to the UTek filesystem
receive the user's default mode and ownership. The mode of
the PC-DOS file becomes write-able, not hidden, nor is it
marked as a system file.
Pccopy refuses to copy a file onto itself.
Both or at least one of the source or destination must be in
a PC-DOS filesystem, though both may not be the same PC-DOS
filesystem. The filenames for the UTek files are standard
UTek pathnames, while the filenames for the PC-DOS files
take the form of
pseudodisk[:/]pathname
where pseudodisk identifies the name of the UTek device or
file containing the PC-DOS filesystem. The : is the PC-DOS
filesystem delimiter. The leading / of the PC-DOS pathname
is optional if the optional ":" is specified; but at least
one of the delimiters must be specified. The character \
(back-slash) may be used in place of / when specifying the
PC-DOS pathname. The PC-DOS pathname is the "directory-
path/file" of the PC-DOS file(s) within the PC-DOS
filesystem.
Wild-cards are permitted as normally for the UTek files and
devices. Wild-cards are allowed in the PC-DOS pathname if
escaped or quoted. The wild-cards when used in referencing
a PC-DOS pathname are sh type wild-cards irregardless of
what shell is in use at the time, i.e.; *.* does not match
FOO., but does match foo.txt.
PC-DOS text files have a different file structure than UTek
text files; UTek's "newlines" (0x0a) become "CR" (0x0d) and
"LF" (0x0a) characters and the PC-DOS files are terminated
with a "control-z" (0x1a) character. Pccopy accomplishes no
cluster padding with the "control-z" character and if the
Printed 7/4/87 1
PCCOPY(1) COMMAND REFERENCE PCCOPY(1)
padding exists on the PC-DOS file the padding is lost when
the file is copied to UTek. Translation between file
formats is accomplished by examining the PC-DOS file's
extension or by one of the selected options. If the PC-DOS
file extension (destination file extension when both are
PC-DOS files) is one of .COM, .EXE, .LIB, .SYS, or .OBJ; the
file will be considered an object file. The option flags -a
and -b have precedence over the recognition of the file
name's extension.
OPTIONS
All of the options may be either upper or lower case.
-a forces all files to be treated as ascii, the "newline",
"LF", "CR", and "control-z" characters are changed as
necessary (text file format translation occurs).
-b forces all files to be treated as object files, the
files are not modified.
-c enables coping from a PC-DOS filesystem to another PC-
DOS filesystem. This option is required for any copies
from a PC-DOS filesystem to another PC-DOS filesystem.
-p clarifies that the copy is to occur from a PC-DOS
filesystem to UTek. This option is required only when
the destination UTek argument appears to be a PC-DOS
filesystem.
-u clarifies that the copy is to occur from UTek to a PC-
DOS filesystem. This option is required only when the
source UTek argument appears to be a PC-DOS filesystem.
-h enables access to "hidden" files.
-v causes verbosity of what is being copied; that is, as
each file is copied its filename is printed.
-w permits coping onto a PC-DOS file which is marked
Read-Only.
FILES
/usr/tmp/pcpath??????
contains the sh expanded UTek file paths.
/usr/tmp/pccopy??????
contains a temporary modified copy of the file when
coping a text file with file format translation
occurring from UTek to a PC-DOS filesystem.
EXAMPLES
This example copies the UTek file orgfile to the PC-DOS file
Printed 7/4/87 2
PCCOPY(1) COMMAND REFERENCE PCCOPY(1)
IMAGE.ASM within the PC-DOS filesystem in /dev/rdfp,
treating the file orgfile as a text file.
pccopy orgfile /dev/rdfp:/image.asm
This example copies all the files in the directory dir
within the PC-DOS filesystem in PC_DISK_C into the current
directory, treating them all as text files and the filenames
will be in capital letters. Note that 'foo:/\*.\*' will not
copy all of the files, but only those with extensions.
pccopy -a PC_DISK_C:/dir/\* .
The next example copies all of the UTek files in mydir into
the directory YOURDIR within the PC-DOS filesystem in
PCpdisk3 treating each file as text or object depending on
the extension of each respective file.
pccopy mydir/* PCpdisk3:/yourdir
Note that the * is not escaped or quoted in this case; the
shell will expand the arguments to:
mydir/file1.com mydir/file2.txt ... PCpdisk3:/yourdir
RETURN VALUE
[NO_ERRS] Command completed without error.
[USAGE] Incorrect command line syntax. Execution
terminated.
[NP_WARN] An error warranting a warning message
occurred. Execution continues.
[NP_ERR] An error occurred that was not a system
error. Execution terminated.
CAVEATS
The PC-DOS filesystem is opened under exclusive use;
therefore, to copy a file from one directory to another
directory of the same PC-DOS filesystem, the file must first
be copied out of the specific PC-DOS filesystem and then
copied to the desired directory.
Wild-cards and back-slashes must be escaped or quoted when
used in reference to the PC-DOS pathname. Wild-cards used in
reference to the path of the PC-DOS filesystem and other
UTek files should not be escaped or quoted unless the shell
environment requires them to be escaped and in that case,
multiple escapes and/or quotes are required in the PC-DOS
filename.
Printed 7/4/87 3
PCCOPY(1) COMMAND REFERENCE PCCOPY(1)
If a file appears garbled, force the copy to occur in the
respective mode of -a or -b.
Unknown results may occur if a specified argument appears to
be a valid PC-DOS filesystem but really isn't, the solution
is to specify the -b option. This is most likely to occur
when accessing an existing binary file on UTek with the 1st
byte being one of the characters 0xE9 or 0xEB and the 24th
byte being one of 0xF8 or 0xFD (a valid boot-parameter-
block); or the 513th byte being one of 0xF8 or 0xFD (the
first byte of the FAT).
An ioctl to the floppy driver is required when the diskette
is formatted as single-sided or 8 sector/track; therefore,
anytime the floppy driver is accessed and the device name
was not specified as rdfp or rdf00p the device is changed to
rdfp or rdf00p.
SEE ALSO
pclabel(1), pcedit(1), pcdir(1), pcsh(1), sh(1), cp(1).
Printed 7/4/87 4
%%index%%
na:72,91;
sy:163,433;
de:596,2267;3007,581;
op:3588,1345;
ex:5255,137;5536,1369;
fi:4933,322;
rv:6905,448;
ca:7353,751;8248,1023;
se:9271,208;
%%index%%000000000176