2020-01-11 09:21:05 -08:00

333 lines
10 KiB
Plaintext

fsio is a utility for manipulating files within file system container files
supported by by various emulators such as SIMH. fsio is designed for Unix and
Unix-like operating systems.
fsio is executed by the command:
fsio [-qv] [cmdfile]
If cmdfile is present, fsio will read commands from the command file and
echoing each command to stdout if -v . present. If the -q switch is present,
no unsolicited output will be generated by fsio. If the command file is not
present fsio will prompt for input:
fsio>
Commands to fsio have the following general syntax:
verb [switches] args...
The following verbs are supported:
mount - makes a container file available to fsio and specifies the file
system it contains.
umount - removes knowledge of a container file from fsio
newfs - create a new container with an empty file system
set - set file system parameters
info - display information about the file system
dir - list a directory
dump - Dump the contents of a file in a human readable format
copy - copies a single file
type - types the contents of a file on the terminal
delete - deletes a file
status - displays the currently mounted file systems
do - execute commands from a file
help - display help on using fsio
exit - terminate fsio
The following commands are only accepted by file systems which are on magtape
devices:
rewind - position the tape to the start of the data stream
eom - position the tape to the end of the data stream
skipf - position the tape by skipping forward over a number of files
skipr - position the tape by skipping backwards over a number of files
fsio will accept shorter versions of each verb as long as they are unique
within the command set, so c, co and cop are all synonyms for copy.
The generic form of the "dev" argument is "DDnn:" where the ":" is optional
in some commands. DD is a sequence of upper and lower case letters and nn is
an octal number in the range 0 - 377. The length of "DDnn" must not exceed 16
characters. In most cases the number field should not be present and will be
flagged as an error if it is. Some container file formats, e.g. RT-11, allow
multiple file systems within a single container and the number is used to
specify which file system to use. For these types of containers the following
rules apply:
- For "mount" and "umount" commands always use "DD:"
- For file access commands (e.g. "dir", "type" etc) use "DDnn:" ("DD:"
is treated the same as "DD0:")
- The "info" command use the presence/absence of the number to control
what information is display. If "DD:" is used, it will display
information abount all file systems within the container. If "DDnn:"
is used, it will only display information about the specific file
system.
Full command syntax:
1. mount
mount [-dfr] [-t type] dev[:] container type
Make the specified container file available to fsio for I/O.
-d Generate debug output if fsio is built with the DEBUG symbol
defined
-f Force the mount to happen even if we are unable to completely
validate the container file format
-r If present, the file system is only available for read access
-t type Specify the type of the container file. This is only required
for OS/8 file systems where type should be one of "rx01",
"rx02" or "rk05".
dev[:] User supplied name to be used for accessing files within the
container file. Files within the container are named by using
the syntax dev:filespec where filespec uses the native syntax
of the container file system. Files within the host file
system can be named directly without any prefix. If such a
file includes ':' in its filename, the reserved prefix local:
may be used to provide access. If you want to disallow default
access to the local filesystem, creating an environment
variable with the name "FSioForceLocal" (the value does not
matter) will require use of the "local:" prefix.
container The name of the file containing the file system
type The type of the file system in the container
2. umount
umount dev[:]
Removes all knowledge of the container file from fsio
dev[:] The name of a previously mounted file system
3. newfs
newfs [-t type] container type
Create a new container file with an empty file system. The container
will be a fixed size (depending on file system type) and may not exist
prior to issuing this command. This command does not support all features
of container files and will build a fixed size container known to work
on the target O/S:
dos11 RK05 image (2.5MB, 4800 blocks)
rt11 MSCP image (32MB, 65535 blocks)
dosmt An empty file suitable for use with any magtape controller
os8 An OS/8 file system
-t type Use a different size for the container file. The size used
will be file system dependent.
For rt11, the following disk types are valid:
rl02 RL02 image (10MB, 20480 blocks)
rx20 RX20 image (512KB, 1024 blocks)
For os8, the following disk types are valid:
rk05 RK05 image (3248 blocks)
rx01 RX01 image (2002 sectors of 128 bytes each)
rx02 RX02 imgae (2002 sectors of 256 bytes each)
container The name of the file to create
type The type of the file system to create in the container
4. set
set dev: args ...
Set parameters on a mounted file system. The arguments are file system
dependent.
dev: The name of a previously mounted file system
5. info
info dev:
Display internal information about the file system within the container
file
dev: The name of a previously mounted file system
6. dir
dir [-fn] dev:dirspec
List the contents of a specific directory.
-f If present, display full directory information.
-n If present, don't rewind the magtape before listing
dev: The name of a previosly mounted file system
dirspec Specification of the directory to list using the dev: syntax.
7. dump
dump [-bcdnwx] dev:src
Dump the contents of a specified file in some human readable format (e.g
hex, octal etc). If no switches are present, the output will be in octal
word format. If multiple size switches are set, the first in alphabetical
order will take precedence.
-b Output byte at a time
-d Output double word (4 bytes) at a type
-c Output ASCII characters
-w Output word (2 bytes) at a time
-x Output the data in hex
-n Don't rewind the magtape before looking for the input file
dev: The name of a previosly mounted file system
src The name of the source file (e.g. dp:input.dat)
8. copy
copy [-anpc blocks] dev1:src dev2:dest
Copy a file. The copy may be between file systems or within a single
filesystem including the host filesystem.
-a Copy in ASCII mode. This performs any necessary translation
of end-of-line characters.
-n Don't rewind the magtape before looking for the input file
-p Pad the file with NULLs. This is target file system
dependent.
-c blocks If the file system for the destination file supports
contiguous files, "blocks" is the number of file system
contiguous files to be allocated before starting to write
the file. This function depends on the value of "blocks":
0 - Use the size of the source file for the allocation,
if that is 0 (e.g. input from a keyboard) use 1.
!= 0 - Use the larger of "blocks" and the size of the
source file.
dev1: The name of a previosly mounted file system
src The name of the source file (e.g. dk:source.file)
dev2: The name of a previously mounted file system
dest The name of the desination file (e.g. dm:dest.file)
Note that wildcard naming is not supported and the source and destination
file names must be fully specified.
9. type
type [-n] dev:src
Copies the specified file to the terminal. This is equivalent to
copy -a dev:src /dev/tty
-n Don't rewind the magtape before looking for the input file
dev: The name of a previously mounted file system
src The name of the source file (e.g. dp:input.txt)
10. delete
delete dev:file
Deletes the specified file from the file system.
dev: The name of a previously mounted file system
file The name of the file to be deleted
11. status
status
Displays the currently mounted file systems.
12. do
do [-q] cmdFile
Executes commands from the specified file
-q By default, command lines are echoed. Use -q to not echo.
13. help
help
Display help text on the terminal.
14. exit
exit
Terminates the fsio application.
15. rewind
rewind dev:
Positions a magtape device to the start of the tape.
dev: The name of a previously mounted file system
16. eom
eom dev:
Positions a magtape device past the end of the last file already on the
tape. A subsequent copy to the device will append a new file to the tape.
dev: The name of a previously mounted file system
17. skipf
skipf dev: n
Changes the current position of the magtape device by skipping forwards
over a number of files. If end of tape is reached before the file count is
complete, the skip operation will terminate early.
dev: The name of a previously mounted file system
n Number of files to skip (must be > 0)
18. skipr
skipr dev: n
Changes the current position of the magtape device by skipping backwards
over a number of files. If beginning of tape is reached before the file
count is complete, the skip operation will terminate early.
dev: The name of a previously mounted file system
n Number of files to skip (must be > 0)