Copyright (c) Hyperion Entertainment and contributors.

AmigaOS Manual: AmigaDOS Working With AmigaDOS

From AmigaOS Documentation Wiki
Revision as of 23:25, 24 January 2014 by Steven Solie (talk | contribs)
Jump to navigation Jump to search
WIP.png This page is currently being updated to AmigaOS 4.x. Some of the information contained here may not yet be applicable in part or totally.

AmigaDOS stores information in the same hierarchical structure as Workbench. AmigaDOS commands have specific rules that you must follow when creating and programs to run on your Amiga. You must be familiar with the terms specific to the file system and with AmigaDOS command concepts to successfully use AmigaDOS. This chapter describes the following:

  • Managing files, directories, and disks
  • Command line basics
  • Types of commands
  • Command structure
  • Special characters
  • Running programs
  • Refining your AmigaDOS environment

Specific commands are fully described in Chapters 6 and 7 of this manual.

Managing Files, Directories, and Disks

In order to use AmigaDOS to access information, you must know where that information is located. On an Amiga, all information is stored in a system of directories and files. This is the same system used by the Workbench, only the method of working with it is different. Most notably, you do not use icons to manipulate the files and directories. See the Workbench User's Guide for detailed information aboutthe Amiga file system and the use of common commands. Use this section to review the following AmigaDOS basic concepts:

  • File system terms
  • File management
  • Naming conventions
  • Keywords

File System Terms

The following are the main elements of the AmigaDOS file system:

Device
A physical device, such as disk drive or printer, or a software (logical) device, such as RAM: or the printer device PRT:.
Partition
A hard disk or part of a hard disk that AmigaDOS treats as a separate device.
Volume
A particular disk or subdivision of a hard disk that AmigaDOS treats as a separate device. Floppy disks and hard disk partitions are volumes.
Directory
Equivalent to a drawer in Workbench.
Root Directory
The top of the filing system for a given volume; the directory that contains all other directories.
Subdirectory
A directory that is contained within another directory.
File
A named collection of data.
Path
The series of device, directory, and subdirectory names that uniquely specifies a particular file and its location.

File Management

AmigaDOS stores information on a device in a file system, which is an organization of directories, subdirectories, and files. Directories and files are arranged in a hierarchical system often referred to as a tree. The branches are directories, which can include subdirectories. At th ends of the branches are the files, unless the directory is empty. Figure 3-1 illustrates a directory tree.

Figure 3-1. Example Directory Tree

Devices

Devices include logical devices and the hardware associated with your Amiga, such as floppy disk drives, hard disk drives, the Ram Disk, RAD:, and peripheral devices. Information stroed on these devices can be accessed using a variety of names.

To access files on a particular volume, you can refer to the volume by its volume name, such as Workbench:, or its device name, such as DF0:. Use the names interchangeably; however, you must always include the colon (:) after the name. When you refer to a disk by volume name, the system searches all the available drives for the volume. If it cannot find a volume of that name, a requester asks you to insert the volume. When you refer to the disk by a particular device name, the system uses whatever volume is inserted in that device.

AmigaDOS has standard names assigned to peripheral devices that are attached to the various ports, as well as to various logical (software) devices. Generally, these devices are used for output, such as copying a file to a printer. The standard device names are:

SYS:
Represents the volume on which the Amiga looks for its basic disk-based resources, such as C: and LIBS:.
PAR:
Represents any device, usually a printer, that is connected to the parallel port. If you copy a file to PAR:, it is sent to the device attached to the parallel port. Output directed here is not modified by any driver software.
SER:
Represents any device connected to the serial port, such as a printer or a modem. Output directed here is not modified by any driver software.
PRT:
Represents the printer. Output to PRT: goes through the selected printer drive and to the serial or parallel port as specified in the Printer editor in the Prefs drawer.
CON:
Represents a console, which uses a window to accept typed input and display text output. The Shell window is one kind of console window.
CONSOLE:
Represents the current console window. An asterisk (*) can also be used in place of CONSOLE:.
NIL:
Represents a dummy device commonly used to prevent output from appearing on the screen. All output sent to NIL: is discarded.
RAM:
Represents the Ram Disk, which is a portion of the Amiga's internal memory that can be used as a storage device. All information in RAM: is lost if the Amiga is rebooted or turned off.
RAD:
Represents a special kind of Ram Disk that is only lost if the system is turned off, but not when rebooted. Refer to Appendix C for detailed information.
DF0:
Represents the Amiga's main internal floppy drive from which the Amiga attempts to boot if there is no other bootable device available.

Directories

Directories are the AmigaDOS equivalent to drawers in Workbench. They allow you to group and classify related files. Each file on a disk is located in a directory. An empty, formatted disk contains one directory, the root directory. If you create a file on an empty disk, that file resides in the root directory. If the file has an icon attached to it, the icon appears in the disk window.

Directories can contain other directories, called subdirectories. The Amiga supports an arbitrary number of nested directories (directories within directories).

Files

A file, the basic unit of storage on a computer, is an organized collection of information. All the programs and any permanent data that a program uses or produces are files. Project icons represent data files. Data files contain the information created or used by a program, such as text, graphic, or spreadsheet files.

.Info Files

Another type of file used by the Amiga is a .info file (pronounced dot info file). The .info files contain the icons that appear on the Workbench screen. Every file or directory that has on icon also has a corresponding .info file. In addition to storing the graphics and position data for the icon image, a .info file contains any Default Tool or Tool Type information entered into the icon's Information window.

When working through the Shell, AmigaDOS does not automatically associate .info files with the corresponding files or directories. For example, if you use the COPY command to copy the Clock file from the Utilities directory to the System directory, the Clock.info file is not copied with it like it is when you drag the Clock icon from one drawer to another in Workbench. In AmigaDOS, to be sure the Clock icon appears in the System drawer, you must also copy the Clock.info file.

When you change icon images by copying .info files, you need to copy an icon of the same type as the item it represents: Tool, Project, Drawer, Disk, or Trashcan. If the icon's type does not match the type of file it represents, it may not open from the Workbench. Icon type is displayed in the icon's Information window and can be changed with the IconEdit program.

Each disk icon has a corresponding disk.info file. If you delete the disk.info file, a default disk icon automatically replaces the previous icon.