User's Guide to the Most Popular Operating System for Personal ... POWER PAINTING: COMPUTER GRAPHICS ON THE MACINTOSH by Verne Bauman and Ronald Kidd / illustrated by Gasper Vaccaro ... Cover design by }. ..... To go straight to the root level, always type a colon (:) followed by a directory name. If you use ...
Bantam Computer Books A s k y o u r bookseller for the b o o k s you have missed THE AMIGADOS USER'S MANUAL b y C o m m o d o r e - A m i g a , Inc. T H E A P P L E //c B O O K b y Bill O ' B r i e n T H E C O M M O D O R E 64 S U R V I V A L M A N U A L b y W i n n L. R o s c h C O M M O D O R E 128 P R O G R A M M E R ' S R E F E R E N C E G U I D E b y C o m m o d o r e B u s i n e s s M a c h i n e s , Inc. E X P L O R I N G A R T I F I C I A L I N T E L L I G E N C E O N Y O U R A P P L E II b y T i m Hartnell E X P L O R I N G A R T I F I C I A L I N T E L L I G E N C E O N Y O U R C O M M O D O R E 64 b y T i m Hartnell EXPLORING THE UNIX ENVIRONMENT b y T h e Waite G r o u p / Irene Pasternack FRAMEWORK FROM THE GROUND UP b y T h e Waite G r o u p / Cynthia Spoor a n d Robert Warren H O W T O G E T T H E M O S T O U T O F C O M P U S E R V E , 2d e d . b y Charles B o w e n a n d David P e y t o n H O W TO GET THE M O S T OUT OF THE SOURCE b y Charles B o w e n a n d David P e y t o n THE MACINTOSH b y Bill O ' B r i e n T H E N E W jr. A G U I D E T O I B M ' S PC;> b y W i n n L. R o s c h ORCHESTRATING SYMPHONY b y T h e Waite G r o u p / D a n Shafer PC-DOS / MS-DOS User's Guide to the Most Popular Operating System for Personal Computers b y Alan M . B o y d P O W E R PAINTING: COMPUTER GRAPHICS O N THE MACINTOSH b y V e r n e B a u m a n a n d Ronald Kidd / illustrated by G a s p e r Vaccaro SMARTER TELECOMMUNICATIONS Hands-On Guide to On-Line Computer Services b y Charles B o w e n a n d Stewart S c h n e i d e r SWING WITH JAZZ: Lotus jazz on the Macintosh b y Data tech Publications C o r p . / Michael McCarty U S E R ' S G U I D E T O T H E A T & T P C 6300 P E R S O N A L C O M P U T E R b y David B . Peatroy, Ricardo A. Anzaldua, H . A. W o h l w e n d , a n d Data tech Publications C o r p .
The AmigaDOS Manual Commodore-Amiga, Inc.
BANTAM BOOKS TORONTO • NEW YORK • LONDON • SYDNEY • AUCKLAND
Bantam Books are published by Bantam Books, Inc. Its trademark, consisting of the words "Bantam Books" and the portrayal of a rooster, is Registered in U.S. Patent and Trademark Office and in other countries. Marca Registrada. Bantam Books, Inc., 666 Fifth Avenue, Nezv York, New York 10103. P R I N T E D IN T H E U N I T E D S T A T E S O F A M E R I C A
H
0 9 8 7 6 5 4 3 2 1
Contents The AmigaDOS User's Manual The AmigaDOS Developer's Manual The AmigaDOS Technical Reference Manual
Preface T h i s b o o k , The AmigaDOS The AmigaDOS The AmigaDOS The AmigaDOS
Manual,
is a c o m b i n a t i o n of three separate publications:
T h e User's Manual c o n t a i n s i n f o r m a t i o n of i n t e r e s t t o e v e r y A m i g a u s e r . T h e r e are m a n y m o r e c o m m a n d s that A m i g a D O S understands t h a n are accessible f r o m t h e W o r k b e n c h . If a u s e r u s e s P r e f e r e n c e s to t u r n o n t h e C L I , t h e s e n e w c o m m a n d s b e c o m e accessible. T h e Developer's Manual describes h o w to use A m i g a D O S from within a p r o g r a m r a t h e r t h a n f r o m a c o m m a n d line i n t e r f a c e . It a l s o fully d o c u m e n t s the A m i g a Macro Assembler and Linker. (Note that the A m i g a Macro A s s e m b l e r is available a s a s e p a r a t e p r o d u c t . ) T h e Technical Reference Manual d e s c r i b e s t h e d a t a s t r u c t u r e s t h a t A m i g a D O S u s e s i n t e r n a l l y . It i n c l u d e s d e s c r i p t i o n s of h o w D O S d i s k d a t a is s t o r e d , a n d t h e f o r m a t of t h e " o b j e c t - f i l e s " t h a t A m i g a D O S u s e s . A d e v e l o p e r o r e x p e r t u s e r w o u l d f i n d t h e i n f o r m a t i o n i n t h i s t e c h n i c a l s e c t i o n to b e v e r y u s e f u l . T o g e t h e r these three publications, in this single v o l u m e , comprise the essential g u i d e t o A m i g a D O S .
AmigaDOS Manual Introduction 1. 2. 3. 4.
Introducing AmigaDOS AmigaDOS Commands ED—The Screen Editor EDIT—The Line Editor
Appendix: Error Codes and Messages Glossary
Introduction
T h i s m a n u a l d e s c r i b e s t h e A m i g a D O S a n d its c o m m a n d s . T h e C o m m a n d L i n e Interpreter (CLI) reads A m i g a D O S c o m m a n d s typed into a CLI w i n d o w a n d translates t h e m into actions performed b y the computer. In this s e n s e , the CLI is similar t o m o r e " t r a d i t i o n a l " c o m p u t e r i n t e r f a c e s : y o u t y p e in c o m m a n d s a n d t h e i n t e r f a c e d i s p l a y s text in r e t u r n . B e c a u s e t h e W o r k b e n c h i n t e r f a c e is sufficient a n d f r i e n d l y f o r m o s t u s e r s t h e W o r k b e n c h diskettes are shipped with the CLI interface " d i s a b l e d " . T o u s e the c o m m a n d s in t h i s m a n u a l y o u m u s t " e n a b l e " t h e C L I i n t e r f a c e . T h i s p u t s a n e w icon, labeled " C L I " on your Workbench. W h e n you have selected and o p e n e d t h i s i c o n , a C L I w i n d o w b e c o m e s a v a i l a b l e , a n d y o u c a n u s e it t o i s s u e text c o m m a n d s directly to A m i g a D O S .
How to Enable the Command Line Interface Boot your c o m p u t e r using t h e Kickstart a n d W o r k b e n c h diskettes. O p e n the diskette icon. O p e n the " P r e f e r e n c e s " tool. N e a r the left-hand side of the s c r e e n , a b o u t t w o - t h i r d s o f t h e w a y d o w n y o u will n o t i c e " C L I " w i t h a b u t t o n f o r " O N " a n d a b u t t o n for " O F F " . S e l e c t t h e " O N " b u t t o n . S e l e c t
"Save"
( l o w e r r i g h t p a r t o f t h e P r e f e r e n c e s s c r e e n ) to l e a v e P r e f e r e n c e s .
How to Open a CLI Window To use the CLI commands, you open a CLI window. O p e n the " S y s t e m " d r a w e r . T h e C L I i c o n (a c u b e c o n t a i n i n g " 1 > " ) s h o u l d n o w b e v i s i b l e . O p e n it.
Using the CLI T o u s e t h e C L I i n t e r f a c e select t h e C L I w i n d o w a n d t y p e t h e d e s i r e d C L I c o m m a n d s . T h e C L I w i n d o w ( s ) m a y b e s i z e d a n d m o v e d j u s t like m o s t o t h e r s . To close the CLI w i n d o w , type " E N D C L I " .
INTRODUCTION
3
Workbench and CLI, Their Relationship and Differences T y p e " D I R " to d i s p l a y a list of files ( a n d d i r e c t o r i e s ) in t h e c u r r e n t d i s k d i r e c t o r y . T h i s is a list of files t h a t m a k e s u p y o u r W o r k b e n c h . Y o u m a y n o t i c e t h a t t h e r e are m o r e files in this d i r e c t o r y t h a n t h e r e a r e i c o n s o n t h e W o r k b e n c h . W o r k b e n c h o n l y d i s p l a y s file " X " if t h a t file h a s a n a s s o c i a t e d " X . i n f o " file. W o r k b e n c h u s e s t h e " . i n f o " file to m a n i p u l a t e t h e i c o n . F o r e x a m p l e , t h e d i s k c o p y p r o g r a m h a s t w o files. T h e file " D i s k c o p y " c o n tains the p r o g r a m a n d " D i s k c o p y . i n f o " contains the W o r k b e n c h information a b o u t it. I n t h e c a s e of p a i n t i n g d a t a files like " m o u n t . p i c " t h e file " m o u n t . p i c . i n f o " c o n t a i n s i c o n i n f o r m a t i o n a n d t h e n a m e of t h e p r o g r a m (default) t h a t s h o u l d p r o c e s s it ( G r a p h i C r a f t ) . I n this c a s e , w h e n t h e u s e r " o p e n s " t h e d a t a file ( m o u n t . p i c ) W o r k b e n c h r u n s t h e p r o g r a m a n d p a s s e s t h e d a t a file n a m e ( m o u n t . p i c ) t o it. A m i g a D O S s u b d i r e c t o r i e s c o r r e s p o n d to W o r k b e n c h d r a w e r s . R a n d o m a c c e s s b l o c k d e v i c e s s u c h as d i s k s (DFO:) c o r r e s p o n d t o t h e d i s k e t t e i c o n s y o u have seen. N o t all p r o g r a m s or c o m m a n d s c a n b e r u n u n d e r b o t h W o r k b e n c h a n d t h e C L I e n v i r o n m e n t . N o n e of t h e C L I c o m m a n d s d e s c r i b e d in C h a p t e r 2 of t h i s m a n u a l can b e run from W o r k b e n c h . For example, there are t w o separate D i s k c o p y c o m m a n d s . T h e o n e i n t h e :cl d i r e c t o r y is r u n f r o m A m i g a D O S ( C L I ) . T h e o n e in t h e s y s t e m d i r e c t o r y ( d r a w e r ) is r u n f r o m W o r k b e n c h .
Chapter 1
Introducing AmigaDOS T h i s c h a p t e r p r o v i d e s a g e n e r a l o v e r v i e w of t h e A m i g a D O S o p e r a t i n g s y s t e m , i n c l u d i n g d e s c r i p t i o n s of t e r m i n a l h a n d l i n g , t h e d i r e c t o r y s t r u c t u r e , a n d c o m m a n d u s e . A t t h e e n d of t h e c h a p t e r , y o u ' l l f i n d a s i m p l e e x a m p l e s e s s i o n w i t h AmigaDOS 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5 1.6 1.7
Chapter Overview / Terminal Handling U s i n g t h e Filing S y s t e m N a m i n g Files Using Directories Setting the Current Directory Setting the Current Device Attaching a Filenote Understanding Device N a m e s Using Directory Conventions and Logical Devices Using AmigaDOS Commands R u n n i n g C o m m a n d s in the Background Executing C o m m a n d Files Directing C o m m a n d Input and Output Interrupting A m i g a D O S Understanding Command Formats Restart Validation Process Commonly Used Commands: A n Example Session Conventions Used
1.1 Chapter Overview A m i g a D O S is a m u l t i - p r o c e s s i n g o p e r a t i n g s y s t e m d e s i g n e d f o r t h e A m i g a . A l t h o u g h y o u c a n u s e it a s a m u l t i - u s e r s y s t e m , y o u n o r m a l l y r u n A m i g a D O S f o r a s i n g l e u s e r . T h e m u l t i - p r o c e s s i n g facility lets m a n y j o b s t a k e p l a c e s i m u l -
INTRODUCING AMIGADOS
5
t a n e o u s l y . Y o u c a n also u s e t h e m u l t i - p r o c e s s i n g facility to s u s p e n d o n e j o b while you run another. E a c h A m i g a D O S p r o c e s s r e p r e s e n t s a p a r t i c u l a r p r o c e s s of t h e o p e r a t i n g s y s t e m — f o r e x a m p l e , t h e filing s y s t e m . O n l y o n e p r o c e s s is r u n n i n g at a t i m e , w h i l e o t h e r p r o c e s s e s a r e e i t h e r w a i t i n g for s o m e t h i n g t o h a p p e n or h a v e b e e n i n t e r r u p t e d a n d a r e w a i t i n g to b e r e s u m e d . E a c h p r o c e s s h a s a p r i o r i t y a s s o c i a t e d w i t h it, a n d t h e p r o c e s s w i t h t h e h i g h e s t priority t h a t is f r e e to r u n d o e s so. Processes of l o w e r priority r u n only w h e n those of h i g h e r priority are w a i t i n g f o r s o m e r e a s o n — f o r e x a m p l e , w a i t i n g for i n f o r m a t i o n to arrive f r o m the disk. T h e s t a n d a r d A m i g a D O S s y s t e m u s e s a n u m b e r of p r o c e s s e s t h a t a r e n o t available t o y o u , f o r e x a m p l e , t h e p r o c e s s t h a t h a n d l e s t h e serial l i n e . T h e s e processes are k n o w n as private processes. O t h e r private processes h a n d l e the t e r m i n a l a n d t h e filing s y s t e m o n a d i s k d r i v e . If t h e h a r d w a r e c o n f i g u r a t i o n c o n t a i n s m o r e t h a n o n e d i s k d r i v e , t h e r e is a p r o c e s s for e a c h d r i v e . A m i g a D O S p r o v i d e s a p r o c e s s t h a t y o u c a n u s e , called a C o m m a n d L i n e I n t e r f a c e or C L I . T h e r e m a y b e s e v e r a l C L I p r o c e s s e s r u n n i n g s i m u l t a n e o u s l y , numbered from 1 onward. The CLI processes read commands and then e x e c u t e t h e m . All c o m m a n d s a n d u s e r p r o g r a m s will r u n u n d e r a n y C L I . T o m a k e additional CLI processes, you use the N E W C L I or R U N c o m m a n d s . T o r e m o v e a C L I p r o c e s s u s e t h e E N D C L I c o m m a n d . ( Y o u c a n f i n d a full d e s c r i p t i o n of t h e s e c o m m a n d s i n C h a p t e r 2 of this m a n u a l . )
1.2 Terminal Handling Y o u c a n d i r e c t i n f o r m a t i o n t h a t y o u e n t e r at t h e t e r m i n a l t o a C o m m a n d L i n e I n t e r f a c e ( C L I ) t h a t tells A m i g a D O S to l o a d a p r o g r a m , o r y o u c a n d i r e c t t h e i n f o r m a t i o n to a p r o g r a m r u n n i n g u n d e r t h a t C L I . In e i t h e r c a s e , a t e r m i n a l (or console) handler processes input and output. This terminal handler also perf o r m s local line e d i t i n g a n d c e r t a i n o t h e r f u n c t i o n s . Y o u c a n t y p e a h e a d a s m a n y as 2 5 5 c h a r a c t e r s — t h e m a x i m u m line l e n g t h . T o c o r r e c t m i s t a k e s , y o u p r e s s t h e B A C K S P A C E k e y . T h i s e r a s e s t h e last character y o u typed. To rub out an entire line, hold d o w n the C T R L key while y o u p r e s s X . T h i s control c o m b i n a t i o n is r e f e r r e d t o f r o m t h i s p o i n t o n in t h e manual as CTRL-X. If y o u t y p e a n y t h i n g , A m i g a D O S w a i t s until y o u h a v e f i n i s h e d t y p i n g b e f o r e d i s p l a y i n g a n y o t h e r o u t p u t . B e c a u s e A m i g a D O S w a i t s f o r y o u to f i n i s h , y o u can type ahead without your input and output becoming intermixed. A m i g a D O S r e c o g n i z e s t h a t y o u h a v e f i n i s h e d a line w h e n y o u p r e s s t h e R E T U R N k e y . Y o u c a n also tell A m i g a D O S t h a t y o u h a v e f i n i s h e d w i t h a line b y c a n c e l l i n g it. T o c a n c e l a l i n e , y o u c a n e i t h e r p r e s s C T R L - X or p r e s s B A C K S P A C E u n t i l all t h e c h a r a c t e r s o n t h e line h a v e b e e n e r a s e d . O n c e A m i g a D O S is s a t i s f i e d t h a t y o u
6
AMIGADOS USER'S MANUAL
h a v e f i n i s h e d , it s t a r t s to d i s p l a y t h e o u t p u t t h a t it w a s h o l d i n g b a c k . If y o u w i s h to s t o p t h e o u t p u t s o t h a t y o u c a n r e a d it, s i m p l y t y p e a n y c h a r a c t e r ( p r e s s i n g t h e s p a c e b a r is t h e e a s i e s t ) , a n d t h e o u t p u t s t o p s . T o r e s t a r t o u t p u t , p r e s s B A C K S P A C E , C T R L - X , or R E T U R N . P r e s s i n g R E T U R N c a u s e s A m i g a D O S to try t o e x e c u t e t h e c o m m a n d line t y p e d a f t e r t h e c u r r e n t p r o g r a m e x i t s . A m i g a D O S recognizes CTRLA as an end-of-file indicator. In certain circums t a n c e s , y o u u s e t h i s c o m b i n a t i o n to t e r m i n a t e a n i n p u t file. ( F o r a c i r c u m stance w h e n you would use CTRLA, see Section 1.3.6.) If y o u f i n d t h a t s t r a n g e c h a r a c t e r s a p p e a r o n t h e s c r e e n w h e n y o u t y p e anything on the keyboard, you have probably pressed C T R L - O by mistake. A m i g a D O S r e c o g n i z e s this c o n t r o l c o m b i n a t i o n as a n i n s t r u c t i o n to t h e c o n s o l e d e v i c e ( C O N : ) to d i s p l a y t h e a l t e r n a t i v e c h a r a c t e r set. T o u n d o t h i s c o n d i t i o n , you press C T R L - N . A n y further characters should then appear as normal. O n t h e o t h e r h a n d , y o u c o u l d p r e s s E S C - C t o clear t h e s c r e e n a n d d i s p l a y n o r m a l text. Note: A n y input through the console device C O N : ignores function keys a n d c u r s o r k e y s . If y o u w a n t t o r e c e i v e t h e s e k e y s , y o u s h o u l d u s e R A W : . ( F o r a d e s c r i p t i o n of R A W : , s e e S e c t i o n 1 . 3 . 6 , " U n d e r s t a n d i n g D e v i c e N a m e s , " l a t e r in t h i s c h a p t e r . ) F i n a l l y , A m i g a D O S r e c o g n i z e s all c o m m a n d s a n d a r g u m e n t s t y p e d in e i t h e r u p p e r or lower case. A m i g a D O S displays a filename with the characters in the c a s e u s e d w h e n it w a s c r e a t e d , b u t f i n d s t h e file n o m a t t e r w h a t c o m b i n a t i o n o f c a s e s y o u u s e to s p e c i f y t h e f i l e n a m e .
1.3 Using the Filing System T h i s s e c t i o n d e s c r i b e s t h e A m i g a D O S filing s y s t e m . In p a r t i c u l a r , it e x p l a i n s h o w to n a m e , o r g a n i z e , a n d recall y o u r files. A file is t h e s m a l l e s t n a m e d o b j e c t u s e d b y A m i g a D O S . T h e s i m p l e s t identific a t i o n of a file is b y its f i l e n a m e , d i s c u s s e d b e l o w i n S e c t i o n 1 . 3 . 1 . H o w e v e r , it m a y b e n e c e s s a r y t o i d e n t i f y a file m o r e fully. S u c h a n i d e n t i f i c a t i o n m a y i n c l u d e t h e d e v i c e or v o l u m e n a m e , a n d / o r d i r e c t o r y n a m e ( s ) a s w e l l a s t h e f i l e n a m e . T h e s e will b e d i s c u s s e d i n f o l l o w i n g s e c t i o n s .
1.3.1 Naming Files A m i g a D O S h o l d s i n f o r m a t i o n o n d i s k s i n a n u m b e r of files, n a m e d s o t h a t y o u c a n i d e n t i f y a n d recall t h e m . T h e filing s y s t e m a l l o w s f i l e n a m e s to h a v e u p t o thirty characters, w h e r e the characters m a y be any printing character except s l a s h (/) a n d c o l o n (:). T h i s m e a n s t h a t y o u c a n i n c l u d e s p a c e ( ) , e q u a l s ( = ) , p l u s ( + ) , a n d d o u b l e q u o t e ( " ) , all s p e c i a l c h a r a c t e r s r e c o g n i z e d b y t h e C L I , w i t h i n a f i l e n a m e . H o w e v e r , if y o u u s e t h e s e special c h a r a c t e r s , y o u m u s t
INTRODUCING AMIGADOS
7
enclose the entire filename with double quotes. To introduce a double quote c h a r a c t e r w i t h i n a f i l e n a m e , y o u m u s t t y p e a n a s t e r i s k (*) i m m e d i a t e l y b e f o r e that character. In addition, to introduce a n asterisk, y o u m u s t type another a s t e r i s k . T h i s m e a n s that a file n a m e d A*B =
C"
s h o u l d b e t y p e d as f o l l o w s :
i n o r d e r f o r t h e C L I to a c c e p t it. N o t e : T h i s u s e of t h e a s t e r i s k is in c o n t r a s t t o m a n y o t h e r o p e r a t i n g s y s t e m s w h e r e it is u s e d a s a u n i v e r s a l w i l d c a r d . A n a s t e r i s k b y itself in A m i g a D O S represents the keyboard and the current window. For example, COPY f i l e n a m e to * c o p i e s t h e f i l e n a m e to t h e s c r e e n . A v o i d s p a c e s b e f o r e or after f i l e n a m e s b e c a u s e t h e y m a y c a u s e c o n f u s i o n .
1.3.2 Using Directories T h e filing s y s t e m also a l l o w s t h e u s e of d i r e c t o r i e s as a w a y t o g r o u p files t o g e t h e r i n t o logical u n i t s . F o r e x a m p l e , y o u m a y u s e t w o d i f f e r e n t d i r e c t o r i e s to s e p a r a t e p r o g r a m s o u r c e f r o m p r o g r a m d o c u m e n t a t i o n , o r t o k e e p files b e l o n g i n g t o o n e p e r s o n distinct f r o m t h o s e b e l o n g i n g t o a n o t h e r . E a c h file o n a d i s k m u s t b e l o n g to a d i r e c t o r y . A n e m p t y d i s k c o n t a i n s o n e d i r e c t o r y , called t h e root d i r e c t o r y . If y o u c r e a t e a file o n a n e m p t y d i s k , t h e n t h a t file b e l o n g s t o t h i s r o o t d i r e c t o r y . H o w e v e r , d i r e c t o r i e s m a y t h e m s e l v e s c o n t a i n f u r t h e r d i r e c t o r i e s . E a c h d i r e c t o r y m a y t h e r e f o r e c o n t a i n f i l e s , or y e t m o r e d i r e c t o r i e s , or a m i x t u r e of b o t h . A n y f i l e n a m e is u n i q u e o n l y w i t h i n t h e d i r e c t o r y it b e l o n g s t o , s o t h a t t h e file " f r e d " i n t h e d i r e c t o r y " b i l l " is a c o m p l e t e l y d i f f e r e n t file f r o m t h e o n e called " f r e d " i n t h e d i r e c t o r y " m a r y " . T h i s filing s t r u c t u r e m e a n s t h a t t w o p e o p l e s h a r i n g a d i s k d o n o t h a v e to w o r r y a b o u t a c c i d e n t a l l y o v e r w r i t i n g files c r e a t e d b y s o m e o n e e l s e , as l o n g as t h e y a l w a y s c r e a t e files i n t h e i r o w n d i r e c t o r i e s .
W A R N I N G : W h e n y o u c r e a t e a file w i t h a f i l e n a m e t h a t a l r e a d y e x i s t s , A m i g a D O S d e l e t e s t h e p r e v i o u s c o n t e n t s of t h a t file. N o m e s s a g e to t h a t effect appears o n the screen.
8
AMIGADOS USER'S M A N U A L
Y o u c a n a l s o u s e this d i r e c t o r y s t r u c t u r e to o r g a n i z e i n f o r m a t i o n o n t h e d i s k , k e e p i n g d i f f e r e n t sorts of files in d i f f e r e n t d i r e c t o r i e s . A n e x a m p l e m i g h t h e l p to clarify t h i s . C o n s i d e r a d i s k t h a t c o n t a i n s t w o d i r e c t o r i e s , called " b i l l " a n d " m a r y . " T h e d i r e c t o r y " b i l l " c o n t a i n s t w o files, called " t e x t " a n d " l e t t e r " . T h e d i r e c t o r y " m a r y " c o n t a i n s a file c a l l e d " d a t a " a n d t w o d i r e c t o r i e s called " l e t t e r " a n d " i n v o i c e " . T h e s e s u b - d i r e c t o r i e s e a c h c o n t a i n a file called " j u n l 8 " . F i g u r e 1-A r e p r e s e n t s t h i s s t r u c t u r e a s f o l l o w s : ROOT
BILL
MARY
TEXT
LETTER
DATA
LETTER
I JLTN18
HSTVOICE
I JTTJ5U8
Figure 1-A: Using Directory Structure N o t e : T h e d i r e c t o r y " b i l l " h a s a file c a l l e d " l e t t e r , " w h i l e t h e d i r e c t o r y " m a r y " c o n t a i n s a d i r e c t o r y called " l e t t e r " . H o w e v e r , t h e r e is n o c o n f u s i o n h e r e b e c a u s e b o t h files a r e in d i f f e r e n t d i r e c t o r i e s . T h e r e is n o limit to t h e depth that y o u can " n e s t " directories. T o s p e c i f y a file fully, y o u m u s t i n c l u d e t h e d i r e c t o r y t h a t o w n s it, t h e d i r e c t o r y o w n i n g t h a t d i r e c t o r y , a n d s o o n . T o s p e c i f y a file, y o u give t h e n a m e s of all t h e d i r e c t o r i e s o n t h e p a t h to t h e d e s i r e d file. T o s e p a r a t e e a c h directory n a m e from the next directory or filename, y o u type a following slash (/). T h u s , t h e full s p e c i f i c a t i o n o f t h e d a t a files o n t h e d i s k s h o w n in F i g u r e 1-A a b o v e is as f o l l o w s : bill/text bill/letter mary/data mary/letter/junl8 mary/lnvoice/junl 8
1.3.3 Setting the Current Directory A full file d e s c r i p t i o n c a n g e t e x t r e m e l y c u m b e r s o m e to t y p e , s o t h e filing s y s t e m m a i n t a i n s t h e i d e a of a c u r r e n t d i r e c t o r y . T h e filing s y s t e m s e a r c h e s f o r files i n t h i s c u r r e n t d i r e c t o r y . T o s p e c i f y t h e c u r r e n t d i r e c t o r y , y o u u s e t h e C D ( C u r r e n t D i r e c t o r y ) c o m m a n d . If y o u h a v e s e t " m a r y " a s y o u r c u r r e n t d i r e c t o r y , t h e n t h e f o l l o w i n g n a m e s w o u l d b e sufficient to specify t h e files in that d i r e c t o r y :
INTRODUCING AMIGADOS
9
data Ietter7juiil8 invoice/junl8 Y o u c a n s e t a n y d i r e c t o r y a s t h e c u r r e n t d i r e c t o r y . T o s p e c i f y a n y files w i t h i n t h a t d i r e c t o r y , s i m p l y t y p e t h e n a m e of t h e file. T o s p e c i f y files w i t h i n s u b d i r e c t o r i e s , y o u n e e d t o t y p e t h e n a m e s of t h e d i r e c t o r i e s o n t h e p a t h f r o m t h e current directory specified. All t h e files o n t h e d i s k a r e still available e v e n t h o u g h y o u ' v e s e t u p a c u r r e n t d i r e c t o r y . To_ i n s t r u c t A m i g a D O S to s e a r c h t h r o u g h t h e d i r e c t o r i e s f r o m t h e r o o t d i r e c t o r y , y o u t y p e a c o l o n (:) at t h e b e g i n n i n g of t h e file d e s c r i p t i o n . T h u s , w h e n y o u r file d e s c r i p t i o n h a s t h e c u r r e n t d i r e c t o r y s e t t o " m a r y " , y o u c a n a l s o o b t a i n t h e file " d a t a " b y t y p i n g t h e d e s c r i p t i o n " : m a r y / d a t a " . U s i n g t h e c u r r e n t d i r e c t o r y m e t h o d s i m p l y s a v e s t y p i n g , b e c a u s e all y o u h a v e t o d o i s specify the filename " d a t a " . T o o b t a i n t h e o t h e r files o n t h e d i s k , first t y p e " : b i l l / t e x t " a n d " : b i l l / l e t t e r " r e s p e c t i v e l y . A n o t h e r w a y m i g h t b e t o C D or t y p e / b e f o r e a f i l e n a m e . S l a s h d o e s n o t m e a n " r o o t " a s i n s o m e s y s t e m s , b u t r e f e r s to t h e d i r e c t o r y a b o v e t h e c u r r e n t d i r e c t o r y . A m i g a D O S a l l o w s m u l t i p l e s l a s h e s . E a c h s l a s h r e f e r s to t h e level a b o v e . S o a U n i x ( T M ) ../ is a / in A m i g a D O S . S i m i l a r l y , a n M S - D O S ™ .A is a / i n A m i g a D O S . t h u s , if t h e c u r r e n t d i r e c t o r y is " : m a r y / l e t t e r " , y o u m a y s p e c i f y t h e file " : m a r y / i n v o i c e / j u n l 8 " a s " / i n v o i c e / j u n l 8 " . T o r e f e r to t h e files in " : b i l l " , y o u c o u l d t y p e : CD .-bill or CD //bill T h e n y o u c o u l d s p e c i f y a n y file i n " b i l l " w i t h a s i n g l e f i l e n a m e . O f c o u r s e , y o u c o u l d a l w a y s u s e t h e // f e a t u r e to r e f e r directly to a specific file. F o r e x a m p l e , T Y P E //bill/letter d i s p l a y s t h e file w i t h o u t y o u r first s e t t i n g " b i l l " a s t h e c u r r e n t d i r e c t o r y . T o g o s t r a i g h t t o t h e r o o t l e v e l , a l w a y s t y p e a c o l o n (:) f o l l o w e d b y a d i r e c t o r y n a m e . If y o u use slashes, y o u m u s t k n o w the exact n u m b e r of levels back desired.
2.3.4 Setting the Current Device Finally, y o u m a y h a v e m a n y disk drives available. E a c h disk device h a s a n a m e , i n t h e f o r m D F n (for e x a m p l e , D F 1 ) , w h e r e t h e " n " r e f e r s t o t h e n u m b e r o f t h e d e v i c e . ( C u r r e n t l y , A m i g a D O S a c c e p t s t h e d e v i c e n a m e s DFO t o D F 3 . )
10
AMIGADOS USER'S MANUAL
E a c h i n d i v i d u a l d i s k is also a s s o c i a t e d w i t h a u n i q u e n a m e , k n o w n a s a v o l u m e n a m e (see b e l o w for m o r e details). In a d d i t i o n , t h e logical d e v i c e S Y S : is a s s i g n e d to t h e d i s k y o u s t a r t e d t h e s y s t e m u p f r o m . Y o u c a n u s e this n a m e i n p l a c e of a d i s k d e v i c e n a m e (like DFO:). T h e c u r r e n t d i r e c t o r y is also a s s o c i a t e d w i t h a c u r r e n t d r i v e , t h e d r i v e w h e r e y o u m a y f i n d t h e d i r e c t o r y . A s y o u k n o w , p r e f a c i n g a file d e s c r i p t i o n w i t h a c o l o n s e r v e s to i d e n t i f y t h e r o o t d i r e c t o r y of t h e c u r r e n t d r i v e . H o w e v e r , t o g i v e t h e r o o t d i r e c t o r y of a specific d r i v e , y o u p r e c e d e t h e c o l o n w i t h t h e d r i v e n a m e . T h u s , y o u h a v e y e t a n o t h e r w a y of s p e c i f y i n g t h e file " d a t a " in d i r e c t o r y " m a r y " , t h a t is " D F l : m a r y / d a t a " . T h i s a s s u m e s t h a t y o u h a v e i n s e r t e d t h e d i s k i n t o d r i v e D F 1 . S o , to r e f e r e n c e a file o n t h e d r i v e DFO called " p r o j e c t - r e p o r t " in directory " p e t e r " , you would type "DFO:peter/project-report", no matter which d i r e c t o r y y o u h a d s e t as t h e c u r r e n t o n e . N o t e : W h e n y o u r e f e r to a d i s k drive or a n y o t h e r d e v i c e , o n its o w n o r w i t h a directory n a m e , y o u should always type the colon, for e x a m p l e , D F 1 : . F i g u r e 1-B illustrates t h e s t r u c t u r e of a file d e s c r i p t i o n . F i g u r e 1-C g i v e s s o m e e x a m p l e s o f v a l i d file d e s c r i p t i o n s . Left o f t h e :
R i g h t of t h e :
R i g h t o f a/
Device name
Directory n a m e
Subdirectory n a m e
or
or
or Volume name
Filename
Filename
Figure 1-B: The Structure of a File Description SYS c o m m a n d s DFO:bill DFLmary/letter DF2:mary/letter/junl8 DOC:report/sectionl/figures FOMTS:smy-font C:cls Figure 1-C: Examples of File Descriptions T o g a i n a c c e s s t o a file o n a p a r t i c u l a r d i s k , y o u c a n t y p e its u n i q u e n a m e , w h i c h is k n o w n a s t h e d i s k ' s v o l u m e n a m e , i n s t e a d of t h e d e v i c e n a m e . F o r i n s t a n c e , if t h e file is o n t h e d i s k " M C C " , y o u c a n s p e c i f y t h e s a m e file b y typing the n a m e " M C G p e t e r / p r o j e c t - r e p o r t " . Y o u can use the v o l u m e n a m e to r e f e r to a d i s k r e g a r d l e s s of t h e drive it is i n . Y o u a s s i g n a v o l u m e n a m e to a d i s k w h e n y o u f o r m a t it (for f u r t h e r d e t a i l s , s e e " F O R M A T " in C h a p t e r 2 , " C o m m a n d s , " later in t h i s m a n u a l ) .
INTRODUCING AMIGADOS
11
A d e v i c e n a m e , u n l i k e a v o l u m e n a m e , is n o t really p a r t of t h e n a m e . F o r e x a m p l e , A m i g a D O S c a n r e a d a file y o u c r e a t e d o n DFO: f r o m a n o t h e r d r i v e , s u c h a s D F 1 : , if y o u p l a c e t h e d i s k in t h a t d r i v e , a s s u m i n g of c o u r s e t h a t t h e d r i v e s a r e i n t e r c h a n g e a b l e . T h a t i s , if y o u c r e a t e a file called " b i l l " o n a d i s k in d r i v e DFO:, t h e file is k n o w n a s " D F O . b i l l " . If y o u t h e n m o v e t h e d i s k t o d r i v e D F 1 : , A m i g a D O S c a n still r e a d t h e file, w h i c h is t h e n k n o w n a s " D F l : b i l l " .
1.3.5 Attaching a Filenote A l t h o u g h a f i l e n a m e c a n g i v e s o m e i n f o r m a t i o n a b o u t its c o n t e n t s , it is o f t e n n e c e s s a r y t o l o o k in t h e file itself t o f i n d o u t m o r e . A m i g a D O S p r o v i d e s a s i m p l e s o l u t i o n t o this p r o b l e m . Y o u c a n u s e t h e c o m m a n d c a l l e d F I L E N O T E to attach a n associated c o m m e n t . Y o u can m a k e u p a c o m m e n t of u p to 80 c h a r a c t e r s ( y o u m u s t e n c l o s e c o m m e n t s c o n t a i n i n g s p a c e s in d o u b l e q u o t e s ) . A n y t h i n g c a n b e p u t in a file c o m m e n t : t h e d a y of t h e file's c r e a t i o n , w h e t h e r or n o t a b u g h a s b e e n f i x e d , t h e v e r s i o n n u m b e r of a p r o g r a m , a n d a n y t h i n g e l s e t h a t m a y h e l p t o i d e n t i f y it. Y o u m u s t a s s o c i a t e a c o m m e n t w i t h a p a r t i c u l a r f i l e — n o t all files h a v e t h e m . T o a t t a c h c o m m e n t s , y o u u s e t h e F I L E N O T E c o m m a n d . If y o u c r e a t e a n e w file, it will n o t h a v e a c o m m e n t . E v e n if t h e n e w file is a c o p y of a file t h a t h a s a c o m m e n t , t h e c o m m e n t is n o t c o p i e d t o t h e n e w file. H o w e v e r , a n y c o m m e n t a t t a c h e d to a file w h i c h is o v e r w r i t t e n is r e t a i n e d . T o w r i t e a p r o g r a m t o c o p y a file a n d its c o m m e n t , y o u ' l l h a v e to d o s o m e e x t r a w o r k to c o p y t h e c o m m e n t . F o r d e t a i l s , s e e C h a p t e r 2 of t h e AmigaDOS Developer's Manual. W h e n y o u r e n a m e a file, t h e c o m m e n t a s s o c i a t e d w i t h it d o e s n ' t c h a n g e . T h e R E N A M E c o m m a n d o n l y c h a n g e s t h e n a m e o f a file. T h e file's c o n t e n t s a n d c o m m e n t r e m a i n t h e s a m e r e g a r d l e s s of t h e n a m e c h a n g e . F o r m o r e d e t a i l s , s e e L I S T a n d F I L E N O T E in C h a p t e r 2 of t h i s m a n u a l .
2.3.6 Understanding Device Names D e v i c e s h a v e n a m e s s o t h a t y o u c a n r e f e r to t h e m b y n a m e . D i s k n a m e s s u c h a s DFO: a r e e x a m p l e s of d e v i c e n a m e s . N o t e t h a t y o u m a y r e f e r t o d e v i c e n a m e s , like f i l e n a m e s , u s i n g e i t h e r u p p e r o r l o w e r c a s e . F o r d i s k s , y o u f o l l o w t h e d e v i c e n a m e b y a f i l e n a m e b e c a u s e A m i g a D O S s u p p o r t s files o n t h e s e devices. Furthermore, the filename can include directories because A m i g a D O S also supports directories. Y o u c a n also c r e a t e files in m e m o r y w i t h t h e d e v i c e c a l l e d R A M : .
RAM:
i m p l e m e n t s a filing s y s t e m i n m e m o r y t h a t s u p p o r t s a n y o f t h e n o r m a l filing system commands. N o t e : R A M : r e q u i r e s t h e library 1 / r a m - h a n d l e r to b e o n t h e d i s k . O n c e the device R A M : exists, you can, for instance, create a directory to c o p y all t h e c o m m a n d s i n t o m e m o r y . T o d o t h i s , t y p e t h e f o l l o w i n g c o m m a n d s :
12
AMIGADOS USER'S MANUAL
MAKEDIR ram:c COPY s y s : c TO r a m : c A S S I G N C: R A M : C Y o u c o u l d t h e n l o o k at d i r e c t o r y " c " ( D I R lists t h i s q u i c k b u t w o u l d l e a v e little R A M : d e v i c e a r e lost w h e n
t h e o u t p u t w i t h D I R R A M : . It w o u l d i n c l u d e t h e as c(dir).) T h i s w o u l d m a k e l o a d i n g c o m m a n d s v e r y r o o m in m e m o r y for a n y t h i n g e l s e . A n y files in t h e y o u reset the machine.
A m i g a D O S a l s o p r o v i d e s a n u m b e r of o t h e r d e v i c e s t h a t y o u c a n u s e i n s t e a d of a r e f e r e n c e to a d i s k file. T h e f o l l o w i n g p a r a g r a p h s d e s c r i b e t h e s e d e v i c e s i n c l u d i n g N I L : , S E R : , P A R : , P R T : , C O N : , a n d R A W : . In p a r t i c u l a r , t h e d e v i c e N I L : is. a d u m m y device. A m i g a D O S simply throws away output written to NIL:. While reading from NIL:, A m i g a D O S gives an immediate "end-of-file" indication. For example, you would type the following E D I T a b c TO n i l : t o u s e t h e e d i t o r to b r o w s e t h r o u g h a file, w h i l e A m i g a D O S t h r o w s a w a y t h e edited output. Y o u u s e t h e d e v i c e called S E R : to r e f e r to a n y d e v i c e c o n n e c t e d t o t h e serial line ( o f t e n a p r i n t e r ) . T h u s , y o u w o u l d t y p e t h e f o l l o w i n g c o m m a n d s e q u e n c e : C O P Y x y z TO s e r : t o i n s t r u c t A m i g a D O S t o s e n d t h e c o n t e n t s of t h e file " x y z " d o w n t h e serial l i n e . N o t e t h a t t h e serial d e v i c e o n l y c o p i e s in m u l t i p l e s of 4 0 0 b y t e s at a t i m e . Copying with SER: can therefore appear granular. T h e d e v i c e P A R : r e f e r s to t h e p a r a l l e l p o r t i n t h e s a m e w a y . A m i g a D O S a l s o p r o v i d e s t h e d e v i c e P R T : (for P R i n T e r ) . P R T : is t h e p r i n t e r y o u chose in the " p r e f e r e n c e s " program. In this program, y o u can define your p r i n t e r t o b e c o n n e c t e d t h r o u g h e i t h e r t h e serial o r p a r a l l e l p o r t . T h u s , t h e command sequence C O P Y xyz T O PRT: p r i n t s t h e file " x y z , " n o m a t t e r h o w t h e p r i n t e r is c o n n e c t e d . P R T : t r a n s l a t e s e v e r y l i n e f e e d c h a r a c t e r i n a file to c a r r i a g e r e t u r n p l u s l i n e f e e d . S o m e p r i n t e r s , h o w e v e r , r e q u i r e files w i t h o u t t r a n s l a t i o n . T o s e n d a file w i t h t h e l i n e f e e d s a s j u s t l i n e f e e d s , y o u u s e P R T : R A W i n s t e a d of P R T : . A m i g a D O S supports multiple windows. To make a n e w w i n d o w , you can s p e c i f y t h e d e v i c e C O N : . T h e f o r m a t f o r C O N : is a s f o l l o w s : CON:x/y/width/height/[title]
^INTRODUCING AMIGADOS
13
w h e r e " x " and " y " are coordinates, " w i d t h " and " h e i g h t " are integers describi n g t h e w i d t h a n d h e i g h t of t h e n e w w i n d o w , a n d " t i t l e " , w h i c h is o p t i o n a l , is a s t r i n g . T h e title a p p e a r s o n t h e w i n d o w ' s title b a r . Y o u m u s t i n c l u d e all t h e s l a s h e s (/), i n c l u d i n g t h e last o n e . Y o u r title c a n i n c l u d e u p to t h i r t y c h a r a c t e r s ( i n c l u d i n g s p a c e s ) . If t h e title h a s s p a c e s , y o u m u s t e n c l o s e t h e w h o l e d e s c r i p t i o n ii d o u b l e q u o t e s (") as s h o w n i n t h e f o l l o w i n g e x a m p l e : "CON:20/10/300/100/my window" T h e r e is a n o t h e r w i n d o w d e v i c e c a l l e d R A W : , b u t it is o f little u s e to t h e g e n e r a l u s e r . ( S e e C h a p t e r 2 of t h e AmigaDOS Developer's Manual i n t h i s b o o k f o r f u r t h e r d e t a i l s . ) Y o u c a n u s e R A W : to c r e a t e a r a w w i n d o w d e v i c e similar t o C O N : . H o w e v e r , unlike C O N : , R A W : does no character translation and does n o t allow y o u to c h a n g e the contents of a line. That is to say, R A W : accepts i n p u t a n d r e t u r n s o u t p u t i n exactly t h e s a m e f o r m t h a t it w a s originally t y p e d . T h i s m e a n s c h a r a c t e r s are s e n t to a p r o g r a m i m m e d i a t e l y w i t h o u t l e t t i n g y o u erase anything with the B A C K S P A C E key. Y o u usually use R A W : from a p r o g r a m w h e r e y o u might w a n t to do input and output without character translation.
W A R N I N G : R A W : is i n t e n d e d f o r t h e a d v a n c e d u s e r . D o n o t u s e R A W : experimentally.
T h e r e is o n e s p e c i a l n a m e , w h i c h is * ( a s t e r i s k ) . Y o u u s e t h i s t o r e f e r t o t h e current w i n d o w , both for input or for output. Y o u can u s e the C O P Y c o m m a n d to c o p y f r o m o n e file t o a n o t h e r . U s i n g *, y o u c a n c o p y f r o m t h e c u r r e n t w i n d o w to a n o t h e r w i n d o w , for e x a m p l e ,
COPY * TO C01ir:20/S0/350/150/ f r o m t h e c u r r e n t w i n d o w t o t h e c u r r e n t w i n d o w , for e x a m p l e ,
COPY * TO * o r f r o m a file t o t h e c u r r e n t w i n d o w , f o r e x a m p l e ,
COPY b i l l / l e t t e r TO * A m i g a D O S f i n i s h e s c o p y i n g w h e n it c o m e s to t h e e n d of t h e file. T o tell A m i g a D O S to s t o p c o p y i n g f r o m *, y o u m u s t g i v e t h e C T R L A c o m b i n a t i o n . N o t e t h a t * is N O T t h e u n i v e r s a l w i l d c a r d .
14
AMIGADOS USER'S MANUAL
1.3.7 Using Directory Conventions and Logical Devices In addition to the aforementioned physical devices, A m i g a D O S supports a v a r i e t y of u s e f u l l o g i c a l d e v i c e s . A m i g a D O S u s e s t h e s e d e v i c e s to f i n d t h e files that your p r o g r a m s require from time to time. (So that your p r o g r a m s can refer t o a s t a n d a r d d e v i c e n a m e r e g a r d l e s s of w h e r e t h e file actually is.) All of t h e s e "logical d e v i c e s " m a y be reassigned b y you to reference any directory. T h e logical d e v i c e s d e s c r i b e d in this s e c t i o n a r e a s f o l l o w s : Name
Description
SYS:
S y s t e m disk root directory C o m m a n d s directory Library directory Sequence Library L i b r a r y f o r O p e n L i b r a r y calls
C: L: s: LIBS: DEVS: FONTS:
D e v i c e for O p e n D e v i c e calls L o a d a b l e f o n t s for O p e n F o n t s Temporary workspace
Directory C L S LIBS DEVS FONTS T
Figure 1-D: Logical Devices Logical Typical
device name: SYS: directory name: My.Boot.Disk:
" S Y S " r e p r e s e n t s t h e S Y S t e m d i s k r o o t d i r e c t o r y . W h e n y o u first start u p t h e A m i g a s y s t e m , A m i g a D O S assigns S Y S : to t h e root directory n a m e of t h e d i s k i n DFO:. If, for i n s t a n c e , t h e d i s k i n d r i v e DFO: h a s t h e v o l u m e n a m e M y . B o o t V D i s k , t h e n A m i g a D O S a s s i g n s S Y S : to M y . B o o t . D I S K : . A f t e r this a s s i g n m e n t , a n y p r o g r a m s t h a t r e f e r to S Y S : u s e t h a t d i s k ' s r o o t d i r e c t o r y . Logical
device
Typical
directory
name:
C:
name:
My.Boot.Diskx
' C represents the C o m m a n d s directory. W h e n y o u type a c o m m a n d to the CLI ( D I R < c r > , f o r e x a m p l e ) , A m i g a D O S first s e a r c h e s for t h a t c o m m a n d in y o u r c u r r e n t d i r e c t o r y . If t h e s y s t e m c a n n o t f i n d t h e c o m m a n d in t h e c u r r e n t d i r e c t o r y , it t h e n l o o k s f o r " C : D I R " . S o t h a t , if y o u h a v e a s s i g n e d " C : " t o a n o t h e r d i r e c t o r y (for e x a m p l e , " B o o t d i s k : c " ) , A m i g a D O S r e a d s a n d e x e cutes from "Boot disk:c/DIR". Logical
device
Typical
directory
name:
L:
name:
My.Boot.Disk:l
" L " r e p r e s e n t s t h e L i b r a r y d i r e c t o r y . T h i s d i r e c t o r y k e e p s t h e o v e r l a y s for large c o m m a n d s a n d n o n r e s i d e n t p a r t s of t h e o p e r a t i n g s y s t e m . F o r i n s t a n c e , t h e d i s k b a s e d r u n - t i m e libraries ( R a m - H a n d l e r , P o r t - H a n d l e r , D i s k - V a l i d a t o r , a n d s o f o r t h ) a r e k e p t h e r e . A m i g a D O S r e q u i r e s t h i s d i r e c t o r y to o p e r a t e .
INTRODUCING AMIGADOS
15
Logical device name: S: Typical directory name: M y . B o o t . D i s k : s " S " r e p r e s e n t s t h e S e q u e n c e library. S e q u e n c e files c o n t a i n c o m m a n d s e q u e n c e s t h a t t h e E X E C U T E c o m m a n d s e a r c h e s for a n d u s e s . E X E C U T E first l o o k s for t h e s e q u e n c e (or b a t c h ) file in y o u r c u r r e n t d i r e c t o r y . If E X E C U T E c a n n o t f i n d it t h e r e , it l o o k s i n t h e d i r e c t o r y t h a t y o u h a v e a s s i g n e d S: t o . Logical device name: L I B S : Typical directory name: M y . B o o t . D i s k : L I B S O p e n L i b r a r y f u n c t i o n calls l o o k h e r e for t h e library if it is n o t a l r e a d y l o a d e d in m e m o r y . Logical device name: D E V S : Typical directory name: M y . B o o t . D i s k : D E V S O p e n D e v i c e calls l o o k h e r e for t h e d e v i c e if it is n o t a l r e a d y l o a d e d in m e m o r y . Logical device name: F O N T S : Typical directory name: M y . B o o t . D i s k : F O N T S O p e n F o n t s l o o k h e r e for y o u r l o a d a b l e f o n t s if t h e y a r e n o t a l r e a d y l o a d e d in memory. N o t e : In a d d i t i o n to t h e a b o v e a s s i g n a b l e d i r e c t o r i e s , m a n y p r o g r a m s o p e n files i n t h e " : T " d i r e c t o r y . A s y o u recall, y o u f i n d file ( o r d i r e c t o r y ) n a m e s p r e d i c a t e d w i t h a " : " i n t h e r o o t directory. T h e r e f o r e " : T " is t h e directory T , w i t h i n t h e r o o t , o n t h e c u r r e n t d i s k . Y o u u s e t h i s d i r e c t o r y t o store t e m p o r a r y files. P r o g r a m s s u c h as e d i t o r s p l a c e t h e i r t e m p o r a r y w o r k files, or b a c k u p c o p i e s o f t h e last file e d i t e d , i n t h i s d i r e c t o r y . If y o u r u n o u t of s p a c e o n a d i s k , t h i s is o n e of t h e first p l a c e s y o u s h o u l d l o o k f o r files t h a t a r e n o l o n g e r n e e d e d . W h e n t h e s y s t e m is first b o o t e d , A m i g a D O S initially a s s i g n s C : t o t h e : C d i r e c t o r y . T h i s m e a n s that if y o u b o o t w i t h a d i s k t h a t y o u h a d f o r m a t t e d b y issuing the c o m m a n d : F O R M A T D R I V E DFO: N A M E " M y . B o o t . D i s k " S Y S : is a s s i g n e d to " M y . B o o t . D i s k " . T h e " l o g i c a l d e v i c e " C : is a s s i g n e d t o t h e C d i r e c t o r y o n t h e s a m e d i s k (that i s , M y . B o o t . D i s k : c ) . L i k e w i s e , t h e f o l l o w i n g a s s i g n m e n t s are m a d e C: L:
My.Boot.Disk:c My.Boot.Disk:l
S: LIBS: DEVS: FONTS:
My.Boot.Disk: s My.Boot.Disk.libs My.Boot.Disk:devs My.Boot.Disk:fonts
16
AMIGADOS USER'S MANUAL
If a d i r e c t o r y is n o t p r e s e n t , t h e c o r r e s p o n d i n g logical d e v i c e is a s s i g n e d to the root directory. If y o u a r e s o l u c k y a s to h a v e a h a r d d i s k (called DHO:) a n d y o u w a n t t o u s e t h e s y s t e m files o n it, y o u m u s t i s s u e t h e f o l l o w i n g c o m m a n d s to t h e s y s t e m : ASSIGN ASSIGN ASSIGN ASSIGN
P l e a s e k e e p i n m i n d t h a t a s s i g n m e n t s a r e g l o b a l t o all C L I p r o c e s s e s . C h a n g i n g a n a s s i g n m e n t w i t h i n o n e w i n d o w c h a n g e s it for all w i n d o w s . If y o u w a n t t o u s e y o u r o w n special f o n t library, t y p e A S S I G N FONTS: "Special font disk:myfonts" If y o u w a n t y o u r c o m m a n d s to l o a d f a s t e r ( a n d y o u h a v e m e m o r y " t o b u r n " ) , type makedlr ram:c copy sys:c r a m : c all a s s i g n c: r a m : c T h i s c o p i e s all o f t h e n o r m a l A m i g a D O S c o m m a n d s t o t h e R A M d i s k a n d reassigns the c o m m a n d s directory so that the s y s t e m finds t h e m there.
1.4 Using AmigaDOS
Commands
A n A m i g a D O S c o m m a n d c o n s i s t s of t h e c o m m a n d n a m e a n d its a r g u m e n t s , if a n y . T o e x e c u t e a n A m i g a D O S c o m m a n d , y o u t y p e t h e c o m m a n d n a m e a n d its a r g u m e n t s after the CLI prompt. W h e n y o u t y p e a c o m m a n d n a m e , t h e c o m m a n d r u n s a s p a r t of t h e C o m m a n d Line Interface (CLI). Y o u can type other c o m m a n d n a m e s ahead, but A m i g a D O S does n o t execute t h e m until the current c o m m a n d has finished. W h e n a c o m m a n d h a s f i n i s h e d , t h e c u r r e n t C L I p r o m p t a p p e a r s . I n this c a s e , t h e c o m m a n d is r u n n i n g interactively. T h e C L I p r o m p t is initially n > , w h e r e n is t h e n u m b e r of t h e C L I p r o c e s s . H o w e v e r , it c a n b e c h a n g e d to s o m e t h i n g else w i t h t h e P R O M P T c o m m a n d . ( F o r f u r t h e r details o n t h e P R O M P T c o m m a n d , s e e C h a p t e r 2 of t h i s m a n u a l . )
17
INTRODUCING AMIGADOS
W A R N I N G : If y o u r u n a c o m m a n d i n t e r a c t i v e l y a n d it fails, A m i g a D O S c o n t i n u e s to e x e c u t e t h e n e x t c o m m a n d y o u t y p e d a n y w a y . T h e r e f o r e , it c a n b e d a n g e r o u s to t y p e m a n y c o m m a n d s a h e a d . F o r e x a m p l e , if y o u type C O P Y a TO b DELETE a a n d t h e C O P Y c o m m a n d fails ( p e r h a p s b e c a u s e t h e d i s k is full), t h e n D E L E T E e x e c u t e s a n d y o u l o s e y o u r file.
1.4.1 Running Commands in the Background Y o u c a n i n s t r u c t A m i g a D O S to r u n a c o m m a n d , or c o m m a n d s , i n t h e b a c k g r o u n d . T o d o t h i s , y o u u s e t h e R U N c o m m a n d . T h i s c r e a t e s a n e w C L I as a s e p a r a t e p r o c e s s of l o w e r priority. I n t h i s c a s e , A m i g a D O S e x e c u t e s s u b s e q u e n t c o m m a n d l i n e s at t h e s a m e t i m e a s t h o s e t h a t h a v e b e e n R U N . F o r e x a m p l e , y o u c a n e x a m i n e t h e c o n t e n t s of y o u r d i r e c t o r y at t h e s a m e t i m e as s e n d i n g a c o p y of y o u r text file to t h e p r i n t e r . T o d o t h i s , t y p e RUN TYPE t e x t _ f i l e to PRT: LIST R U N c r e a t e s a n e w C L I a n d carries o u t y o u r p r i n t i n g w h i l e y o u list y o u r d i r e c t o r y files o n y o u r original C L I w i n d o w . You can takes each commands line, press plus sign example,
a s k A m i g a D O S t o carry o u t s e v e r a l c o m m a n d s u s i n g R U N . R U N c o m m a n d a n d carries it o u t in t h e g i v e n o r d e r . T h e l i n e c o n t a i n i n g a f t e r R U N is called a c o m m a n d l i n e . T o t e r m i n a t e t h e c o m m a n d R E T U R N . T o e x t e n d y o u r c o m m a n d line o v e r s e v e r a l l i n e s , t y p e a ( + ) b e f o r e p r e s s i n g R E T U R N o n e v e r y line e x c e p t t h e last. F o r
RUN J O I N t e x t _ f i l e 1 text—file2 AS text—file S O R T t e x t — f i l e TO s o r t e d t e x t + T Y P E sorted text to PRT:
+
1.4.2 Executing Command Files Y o u c a n a l s o u s e t h e E X E C U T E c o m m a n d t o e x e c u t e c o m m a n d l i n e s i n a file i n s t e a d of t y p i n g t h e m in directly. T h e C L I r e a d s t h e s e q u e n c e of c o m m a n d s f r o m t h e file u n t i l it f i n d s a n e r r o r o r t h e e n d of t h e file. If it f i n d s a n e r r o r ,
18
AMIGADOS USER'S MANUAL
A m i g a D O S d o e s n o t e x e c u t e s u b s e q u e n t c o m m a n d s o n t h e R U N line or in t h e file u s e d b y E X E C U T E , u n l e s s y o u h a v e u s e d t h e F A I L A T c o m m a n d . S e e C h a p t e r 2 of t h i s m a n u a l f o r details o n t h e F A I L A T c o m m a n d . T h e C L I o n l y gives p r o m p t s after executing c o m m a n d s that have run interactively.
1.4.3 Directing Command Input and Output A m i g a D O S p r o v i d e s a w a y for y o u to redirect s t a n d a r d i n p u t a n d o u t p u t . Y o u u s e t h e > a n d < s y m b o l s as c o m m a n d s . W h e n y o u t y p e a c o m m a n d , A m i g a D O S u s u a l l y d i s p l a y s t h e o u t p u t f r o m t h a t c o m m a n d o n t h e s c r e e n . T o tell A m i g a D O S to s e n d t h e o u t p u t to a file, y o u c a n u s e t h e > c o m m a n d . T o tell A m i g a D O S to a c c e p t t h e i n p u t to a p r o g r a m f r o m a s p e c i f i e d file r a t h e r t h a n f r o m t h e k e y b o a r d , y o u u s e t h e < c o m m a n d . T h e < a n d > c o m m a n d s act like traffic c o p s w h o direct t h e f l o w of i n f o r m a t i o n . F o r e x a m p l e , to direct t h e o u t p u t f r o m t h e D A T E c o m m a n d a n d w r i t e it to t h e file n a m e d " t e x t the following c o m m a n d line: DATE >
file", you would type
text_file
S e e C h a p t e r 2 of t h e User's symbols.
Manual
f o r a full s p e c i f i c a t i o n of t h e
1.4.4 Interrupting AmigaDOS A m i g a D O S a l l o w s y o u to indicate four levels of a t t e n t i o n i n t e r r u p t w i t h C T R L - C , C T R L - D , C T R L - E , a n d C T R L - F . T o s t o p t h e c u r r e n t c o m m a n d f r o m w h a t e v e r it w a s d o i n g , p r e s s C T R L - C . In s o m e c a s e s , s u c h a s E D I T , p r e s s i n g C T R L - C i n s t r u c t s t h e c o m m a n d to s t o p w h a t it w a s d o i n g a n d t h e n t o r e t u r n to r e a d i n g m o r e E D I T c o m m a n d s . T o tell t h e C L I to s t o p a c o m m a n d s e q u e n c e initiated b y the E X E C U T E c o m m a n d as soon as the current c o m m a n d being executed finishes, press C T R L - D . C T R L - E a n d CTRL-F are only u s e d b y certain c o m m a n d s in s p e c i a l c a s e s . S e e t h e Developer's Manual in t h i s b o o k f o r d e t a i l s . N o t e : It is t h e p r o g r a m m e r ' s r e s p o n s i b i l i t y to d e t e c t a n d r e s p o n d to t h e s e i n t e r r u p t i o n f l a g s . A m i g a D O S will n o t kill a p r o g r a m b y itself.
1.4.5 Understanding Command Formats T h i s s e c t i o n e x p l a i n s t h e s t a n d a r d f o r m a t or a r g u m e n t t e m p l a t e u s e d b y m o s t A m i g a D O S c o m m a n d s t o s p e c i f y t h e i r a r g u m e n t s . C h a p t e r 2 of t h i s m a n u a l i n c l u d e s t h i s a r g u m e n t t e m p l a t e in t h e d o c u m e n t a t i o n of e a c h of t h e c o m m a n d s . T h e t e m p l a t e p r o v i d e s y o u w i t h a g r e a t deal of flexibility i n t h e o r d e r a n d f o r m of t h e s y n t a x of y o u r c o m m a n d s . T h e a r g u m e n t t e m p l a t e s p e c i f i e s a list of k e y w o r d s t h a t y o u m a y u s e as
INTRODUCING AMIGADOS
19
s y n o n y m s , so that you type the alternatives after the k e y w o r d , a n d separate them with an = For example, A B C , W W W , X Y Z = ZZZ specifies k e y w o r d s , A B C , W W W , and X Y Z . T h e user m a y u s e k e y w o r d Z Z Z as a n a l t e r n a t i v e to t h e k e y w o r d X Y Z . T h e s e k e y w o r d s s p e c i f y t h e n u m b e r a n d f o r m of t h e a r g u m e n t s t h a t t h e p r o g r a m e x p e c t s . T h e a r g u m e n t s m a y b e o p t i o n a l or r e q u i r e d . If y o u g i v e t h e a r g u m e n t s , y o u m a y s p e c i f y t h e m in o n e of t w o w a y s : By position By keyword
I n t h i s c a s e , y o u p r o v i d e t h e a r g u m e n t s in t h e s a m e o r d e r a s t h e k e y w o r d list i n d i c a t e s . In this c a s e , t h e o r d e r d o e s n o t m a t t e r , a n d y o u p r e c e d e e a c h argument with the relevant keyword.
F o r e x a m p l e , if t h e c o m m a n d M Y C O M M A N D r e a d f r o m o n e file a n d w r o t e to another, the argument template would be: FROMTO Y o u could use the c o m m a n d specifying the arguments by position: MYCOMMAND input-file output-file or u s i n g t h e k e y w o r d s : M Y C O M M A N D F R O M i n p u t - f i l e TO o u t p u t - f i l e M Y C O M M A N D TO o u t p u t - f i l e F R O M i n p u t - f i l e Y o u could also combine the positional and keyword argument specifications, for e x a m p l e , with the following: M Y C O M M A N D i n p u t - f i l e TO o u t p u t - f i l e w h e r e y o u give t h e F R O M a r g u m e n t b y p o s i t i o n , a n d t h e T O a r g u m e n t b y k e y w o r d . N o t e t h a t t h e f o l l o w i n g f o r m is i n c o r r e c t : MYCOMMAND output-file FROM input-file b e c a u s e t h e c o m m a n d a s s u m e s t h a t ' o u t p u t - f i l e ' is t h e first p o s i t i o n a l a r g u m e n t (that i s , t h e F R O M file).
20
AMIGADOS USER'S MANUAL
If t h e a r g u m e n t is n o t a s i n g l e w o r d (that i s , s u r r o u n d e d or " d e l i m i t e d " b y s p a c e s ) , t h e n y o u m u s t e n c l o s e it w i t h q u o t a t i o n m a r k s ( " ) . If t h e a r g u m e n t h a s t h e s a m e v a l u e a s o n e of t h e k e y w o r d s , y o u m u s t also e n c l o s e it w i t h q u o t a t i o n marks. For example, the following: M Y C O M M A x T D " f i l e n a m e " TO " d e s t i n a t i o n " s u p p l i e s t h e text " f i l e n a m e " as t h e F R O M a r g u m e n t , a n d t h e file
name
" d e s t i n a t i o n " as the T O argument. T h e k e y w o r d s in t h e s e a r g u m e n t lists h a v e c e r t a i n qualifiers a s s o c i a t e d w i t h t h e m . T h e s e qualifiers a r e r e p r e s e n t e d b y a s l a s h (/) a n d a specific l e t t e r . T h e m e a n i n g s of t h e qualifiers a r e a s f o l l o w s : /A /K
T h e a r g u m e n t is r e q u i r e d a n d m a y n o t b e o m i t t e d . T h e argument must be given with the keyword and may not be used positionally.
/S
T h e k e y w o r d is a s w i t c h (that i s , a t o g g l e ) a n d t a k e s n o a r g u m e n t .
T h e qualifiers A a n d K m a y be c o m b i n e d , so that the template DRIVE/A/K m e a n s that y o u m u s t give the a r g u m e n t and k e y w o r d D R I V E . In s o m e cases, no keywords m a y b e given. For example, the
command
D E L E T E s i m p l y t a k e s a n u m b e r of files for A m i g a D O S to d e l e t e . In t h i s c a s e , y o u simply omit the k e y w o r d value, b u t the c o m m a s normally u s e d to separate t h e k e y w o r d s r e m a i n in t h e t e m p l a t e . T h u s , t h e t e m p l a t e f o r D E L E T E , t h a t c a n t a k e u p to t e n f i l e n a m e s , is
» ) ) » ) » ) » )
F i n a l l y , c o n s i d e r t h e c o m m a n d T Y P E . T h e a r g u m e n t t e m p l a t e is FROM/A,TO,OPT/K w h i c h m e a n s t h a t y o u m a y g i v e t h e first a r g u m e n t b y p o s i t i o n or b y k e y w o r d , b u t t h a t first a r g u m e n t is r e q u i r e d . T h e s e c o n d a r g u m e n t ( T O ) is o p t i o n a l , a n d y o u m a y o m i t t h e k e y w o r d . T h e O P T a r g u m e n t is o p t i o n a l , b u t if it is g i v e n , y o u m u s t p r o v i d e t h e k e y w o r d . S o , t h e f o l l o w i n g a r e all valid f o r m s of t h e TYPE command:
INTRODUCING AMIGADOS
TYPE TYPE TYPE TYPE TYPE TYPE TYPE
21
filename PROM filename f i l e n a m e TO o u t p u t - f i l e f i l e n a m e output-file TO o u t p u t - f i l e F R O M f i l e n a m e OPT n f i l e n a m e OPT n f i l e n a m e OPT n TO o u t p u t - f i l e
A l t h o u g h this m a n u a l lists all t h e a r g u m e n t s e x p e c t e d b y t h e c o m m a n d s , y o u c a n d i s p l a y t h e a r g u m e n t t e m p l a t e b y s i m p l y t y p i n g t h e n a m e of t h e c o m m a n d , f o l l o w e d b y a s p a c e a n d a q u e s t i o n m a r k (?). If t h e a r g u m e n t s y o u s p e c i f y d o n o t m a t c h t h e t e m p l a t e , m o s t c o m m a n d s simply display the m e s s a g e " B a d a r g s " or " B a d a r g u m e n t s " a n d stop. Y o u m u s t retype the c o m m a n d n a m e and argument. To display on the screen help on w h a t arguments the c o m m a n d expected, you can always type a question mark (?)•
1.5 Restart Validation Process W h e n y o u first i n s e r t a d i s k f o r u p d a t i n g , A m i g a D O S c r e a t e s a p r o c e s s at l o w priority. This validates the entire structure on the disk. Until the restart process h a s c o m p l e t e d this j o b , y o u c a n n o t c r e a t e files o n t h e d i s k . It is p o s s i b l e , h o w e v e r , t o r e a d files. W h e n t h e r e s t a r t p r o c e s s c o m p l e t e s , A m i g a D O S c h e c k s t o s e e if y o u h a v e s e t the system date a n d time. T o set the date a n d time, y o u u s e the
DATE
c o m m a n d . If y o u d o n o t s p e c i f y t h e s y s t e m d a t e , A m i g a D O S s e t s t h e s y s t e m d a t e to t h e d a t e a n d t i m e o f t h e m o s t r e c e n t l y c r e a t e d file o n t h e i n s e r t e d d i s k . T h i s e n s u r e s t h a t n e w e r v e r s i o n s of files h a v e m o r e r e c e n t d a t e s , e v e n t h o u g h t h e a c t u a l t i m e a n d d a t e will b e i n c o r r e c t . If y o u a s k f o r t h e d a t e a n d t h e t i m e b e f o r e t h e v a l i d a t i o n is c o m p l e t e , A m i g a D O S displays the date a n d time as unset. Y o u can t h e n either wait for t h e v a l i d a t i o n t o c o m p l e t e o r u s e D A T E to e n t e r t h e c o r r e c t d a t e a n d t i m e . V a l i d a t i o n s h o u l d h a p p e n at o n c e ; o t h e r w i s e , it s h o u l d n e v e r t a k e l o n g e r t h a n one minute.
1.6 Commonly Used Commands: An Example Session This manual describes the various A m i g a D O S c o m m a n d s . T h e C o m m a n d Line I n t e r p r e t e r (CLI) r e a d s A m i g a D O S c o m m a n d s t y p e d i n t o a C L I w i n d o w a n d t r a n s l a t e s t h e m i n t o a c t i o n s p e r f o r m e d b y t h e c o m p u t e r . I n this s e n s e t h e C L I
22
AMIGADOS USER'S MANUAL
is similar to m o r e " t r a d i t i o n a l " c o m p u t e r i n t e r f a c e s : y o u t y p e in c o m m a n d s a n d t h e i n t e r f a c e d i s p l a y s text in r e t u r n . B e c a u s e t h e W o r k b e n c h i n t e r f a c e is s u f f i c i e n t a n d f r i e n d l y f o r m o s t u s e r s , the W o r k b e n c h diskettes are s h i p p e d with the CLI interface " d i s a b l e d " . To u s e t h e c o m m a n d s i n this m a n u a l y o u m u s t " e n a b l e " t h e C L I i n t e r f a c e . T h i s p u t s a n e w icon, labeled " C L I " on your Workbench. W h e n you have selected and o p e n e d this i c o n , a C L I w i n d o w b e c o m e s a v a i l a b l e , a n d y o u c a n u s e it to i s s u e t e x t c o m m a n d s directly to A m i g a D O S .
How to Enable the Command Line Interface B o o t y o u r c o m p u t e r u s i n g t h e K i c k s t a r t d i s k e t t e a n d a w r i t a b l e c o p y of y o u r W o r k b e n c h diskette. O p e n the W o r k b e n c h diskette icon. O p e n the "Prefere n c e s " t o o l . N e a r t h e l e f t - h a n d s i d e of t h e s c r e e n , a b o u t t w o - t h i r d s of t h e w a y d o w n y o u will n o t i c e " C L I " w i t h a b u t t o n for " O N " a n d a b u t t o n " O F F " . S e l e c t t h e " O N " b u t t o n . S e l e c t " S a v e " ( l o w e r r i g h t p a r t of t h e P r e f e r e n c e s s c r e e n ) to l e a v e P r e f e r e n c e s .
How to Make a New CLI Window To use the CLI c o m m a n d s , you open a CLI window. O p e n the " S y s t e m " d r a w e r . T h e C L I i c o n (a c u b e c o n t a i n i n g " 1 > " ) s h o u l d n o w b e v i s i b l e . O p e n it.
Using the CLI To use the CLI interface, select the CLI w i n d o w a n d type the desired C L I c o m m a n d s ( d e s c r i b e d w i t h i n this m a n u a l ) . T h e C L I w i n d o w ( s ) m a y b e s i z e d a n d m o v e d j u s t like m a n y o t h e r s . T o c l o s e t h e C L I w i n d o w , t y p e " E N D C L I " .
Workbench and CLI: Their Relationships and Differences Type " D I R "
t o d i s p l a y a list of files ( a n d d i r e c t o r i e s ) in t h e c u r r e n t
disk
d i r e c t o r y . T h i s is a list o f files t h a t m a k e s u p y o u r W o r k b e n c h . Y o u m a y n o t i c e t h a t t h e r e a r e m a n y m o r e files in t h i s d i r e c t o r y t h a n t h e r e a r e i c o n s o n t h e W o r k b e n c h . T h e r e a s o n f o r this is t h a t W o r k b e n c h will o n l y d i s p l a y file " X " if it h a s a n a s s o c i a t e d " X . i n f o " file. In fact t h e " . i n f o " ( p r o n o u n c e d " d o t i n f o " ) file c o n t a i n s all of t h e i c o n d i s p l a y i n f o r m a t i o n . F o r e x a m p l e , t h e d i s k c o p y p r o g r a m h a s t w o files a s s o c i a t e d w i t h it. T h e file " D i s k c o p y " c o n t a i n s t h e p r o g r a m a n d " D i s k c o p y . i n f o " c o n t a i n s t h e W o r k b e n c h i n f o r m a t i o n a b o u t it. I n t h e c a s e o f p a i n t i n g d a t a files l i k e " m o u n t . p i c " , t h e file " m o u n t . p i c . i n f o " c o n t a i n s i c o n i n f o r m a t i o n a n d t h e n a m e of t h e p r o g r a m (default) t h a t s h o u l d p r o c e s s it ( G r a p h i C r a f t ) . In this c a s e , w h e n
the
INTRODUCING AMIGADOS
23
u s e r " o p e n s " t h e d a t a file ( m o u n t . p i c . i n f o ) , W o r k b e n c h r u n s t h e p r o g r a m a n d p a s s e s t h e d a t a file n a m e ( m o u n t , pic) to it. A m i g a D O S sub-directories correspond to W o r k b e n c h drawers. R a n d o m acc e s s b l o c k d e v i c e s s u c h as d i s k s (DFO:) c o r r e s p o n d t o t h e d i s k e t t e i c o n s y o u have seen. N o t all p r o g r a m s o r c o m m a n d s c a n b e r u n u n d e r b o t h W o r k b e n c h a n d t h e C L I e n v i r o n m e n t . N o n e of t h e C L I c o m m a n d s d e s c r i b e d in C h a p t e r 2 o f t h e AmigaDOS User's Manual c a n b e r u n f r o m W o r k b e n c h . F o r e x a m p l e , t h e r e a r e t w o s e p a r a t e D i s k c o p y c o m m a n d s . T h e o n e i n t h e :c/ d i r e c t o r y w o r k s w i t h A m i g a D O S ( C L I ) . T h e o n e in t h e s y s t e m d i r e c t o r y ( d r a w e r ) w o r k s w i t h Workbench.
An Introduction to Some of the AmigaDOS Commands A l t h o u g h all of t h e c o m m a n d s t h a t a r e available t h r o u g h t h e C L I a r e e x p l a i n e d in detail in t h e r e f e r e n c e p a r t of t h e AmigaDOS User's Manual, w e h a v e f o u n d t h a t m o s t u s e r s will u s e v e r y f e w of t h e a d v a n c e d o p t i o n s . T h e r e f o r e w e h a v e p r o v i d e d a s u m m a r y h e r e s h o w i n g v a r i o u s c o m m a n d s in t h e i r m o s t c o m m o n form. T h e c o m m a n d s summarized b e l o w (along with the actual A m i g a D O S c o m m a n d n a m e ) a s k A m i g a D O S to d o s u c h c o m m a n d s as • C o p y a diskette ( D I S K C O P Y ) • Format a n e w diskette ( F O R M A T ) • M a k e a formatted diskette bootable; create a CLI disk (INSTALL) • Relabel a diskette (RELABEL) • L o o k at t h e d i r e c t o r y of a d i s k e t t e ( D I R ) • G e t i n f o r m a t i o n a b o u t files ( L I S T ) • P r e v e n t a file f r o m a c c i d e n t a l d e l e t i o n ( P R O T E C T ) • G e t I n f o r m a t i o n a b o u t a file s y s t e m ( I N F O ) • C h a n g e a current directory (CD) • Set the date and time (DATE) • R e d i r e c t t h e o u t p u t of a c o m m a n d ( > ) • T y p e a text file to t h e s c r e e n ( T Y P E ) • R e n a m e a file ( R E N A M E ) • D e l e t e a file ( D E L E T E ) • Create a n e w directory ( M A K E D I R ) • C o p y files o n a d u a l - d r i v e s y s t e m ( C O P Y ) • C o p y files o n a s i n g l e - d r i v e s y s t e m ( C O P Y ) • F i n d files o n a d i s k e t t e ( D I R O P T A ) • D o s o m e t h i n g a u t o m a t i c a l l y at b o o t t i m e ( u s i n g S t a r t u p - S e q u e n c e )
24
AMIGADOS USER'S MANUAL
• T e l l A m i g a D O S w h e r e to l o o k for c e r t a i n t h i n g s ( A S S I G N ) • Open a new CLI window (NEWCLI) • Close an existing CLI w i n d o w (ENDCLI) All of the c o m m a n d sequences below a s s u m e that y o u have started your s y s t e m w i t h a C L I disk r a t h e r t h a n a W o r k b e n c h d i s k , or t h a t y o u h a v e t u r n e d o n the CLI using the preferences tool a n d h a v e entered the CLI b y that path. T h e s e q u e n c e for t u r n i n g o n t h e C L I is p r o v i d e d earlier i n t h i s m a n u a l .
For a New User F o r a n e w u s e r , w e s u g g e s t t h a t y o u r e a d a n d try e a c h o f t h e s e i t e m s i n s e q u e n c e . E a c h c o m m a n d t h a t is s h o w n b e l o w l e a v e s a test d i s k in a k n o w n s t a t e so t h a t t h e c o m m a n d t h a t i m m e d i a t e l y f o l l o w s will w o r k e x a c t l y a s s h o w n . L a t e r , w h e n y o u are m o r e familiar w i t h t h e s y s t e m , t h e p a r a g r a p h titles s h o w n b e l o w will s e r v e to r e f r e s h y o u r m e m o r y .
How to Begin Before y o u begin this section, b e sure y o u h a v e two blank, double-sided d i s k e t t e s , a n d e i t h e r y o u r W o r k b e n c h disk or y o u r C L I d i s k . B e f o r e y o u b e g i n , write-protect your master diskette, and write-enable the blank diskettes. M o s t of t h e c o m m a n d s g i v e n b e l o w a s s u m e t h a t y o u h a v e a s i n g l e - d r i v e s y s t e m ; h o w e v e r , for c o n v e n i e n c e of t h o s e w i t h d u a l - d r i v e s y s t e m s , t h e d u a l - d r i v e version of the c o m m a n d is occasionally given. C o m m a n d s t h a t i n s t r u c t A m i g a D O S t o e x e c u t e are s h o w n i n t h e f o l l o w i n g s e c t i o n s , i n d e n t e d f r o m t h e left m a r g i n . A f t e r t y p i n g e a c h c o m m a n d , p r e s s t h e R E T U R N k e y to r e t u r n c o n t r o l to A m i g a D O S . A l t h o u g h t h e c o m m a n d s are all s h o w n i n capital l e t t e r s , t h i s is s i m p l y t o d i s t i n g u i s h t h e m f r o m t h e r e s t of t h e text. A m i g a D O S will a c c e p t t h e c o m m a n d s i n l o w e r c a s e a s w e l l a s u p p e r case. In the sections that follow, the notations "dfO:" and "drive 0 " refer to the d i s k drive t h a t is built i n t o t h e A m i g a . T h e n o t a t i o n " d f l : " r e f e r s to t h e first e x t e r n a l 3y2-inch disk d r i v e . Y o u will o c c a s i o n a l l y s e e a s e m i c o l o n o n a c o m m a n d line t h a t y o u are t o l d t o t y p e . W h a t f o l l o w s t h e s e m i c o l o n is t r e a t e d a s a c o m m e n t b y A m i g a D O S . S i n c e A m i g a D O S i g n o r e s t h e r e s t of t h e l i n e , y o u d o n ' t n e e d to t y p e t h e c o m m e n t a l o n g w i t h t h e c o m m a n d . It is f o r y o u r i n f o r m a t i o n o n l y . F o r m o s t c o m m a n d s , y o u c a n g e t a v e r y l i m i t e d f o r m of h e l p b y t y p i n g t h e c o m m a n d n a m e , f o l l o w e d b y a q u e s t i o n m a r k (?) a n d p r e s s i n g R E T U R N . It s h o w s y o u t h e " t e m p l a t e " of a c o m m a n d , c o n t a i n i n g t h e s e q u e n c e of p a r a m e t e r s it e x p e c t s a n d t h e k e y w o r d s it r e c o g n i z e s .
INTRODUCING AMIGADOS
25
Copying a Disk Y o u c a n u s e t h i s s e q u e n c e to b a c k u p y o u r s y s t e m m a s t e r d i s k o r a n y o t h e r disk. For a 1 disk system D I S K C O P Y F R O M dfO: TO dfO: For a 2 disk system D I S K C O P Y F R O M dfO: TO d f l : F o l l o w t h e i n s t r u c t i o n s as t h e y a p p e a r . F o r a single drive s y s t e m , y o u ' l l b e instructed to insert the master ( F R O M ) disk. T h e n , as the copying progresses, A m i g a D O S a s k s y o u to i n s e r t t h e c o p y ( T O ) d i s k , s w a p p i n g m a s t e r a n d c o p y i n a n d o u t u n t i l all of t h e d i s k e t t e h a s b e e n d u p l i c a t e d . F o r a t w o d i s k s y s t e m , y o u ' l l b e i n s t r u c t e d t o p u t t h e m a s t e r d i s k e t t e i n t o d r i v e dfO: ( t h e b u i l t - i n drive) a n d t h e c o p y d i s k e t t e o n t o w h i c h to c o p y i n t o d f l : ( t h e first e x t e r n a l drive). R e m o v e y o u r m a s t e r d i s k e t t e (either W o r k b e n c h o r C L I d i s k ) a n d p u t y o u r m a s t e r d i s k e t t e in a safe p l a c e . L e a v e t h e c o p y w r i t e - e n a b l e d s o t h a t y o u c a n s t o r e i n f o r m a t i o n o n it. I n s e r t t h e c o p y y o u h a v e j u s t m a d e i n t o t h e b u i l t - i n d r i v e a n d r e b o o t y o u r s y s t e m f r o m t h e c o p y . ( S e e I n t r o d u c t i o n T o A m i g a for the reboot process). A f t e r t h e r e b o o t , r e e n t e r t h e C L I m o d e a g a i n . If y o u b o o t w i t h a C L I d i s k , t h e r e b o o t e n t e r s t h e C L I a u t o m a t i c a l l y . If y o u a r e u s i n g a W o r k b e n c h d i s k , y o u m u s t o p e n t h e C L I i c o n in t h e s y s t e m d r a w e r of t h e W o r k b e n c h .
Formatting a Disk T o t r y t h i s c o m m a n d , y o u r W o r k b e n c h or C L I d i s k e t t e c o p y s h o u l d b e in d r i v e 0, a n d y o u should have a blank diskette available. S o m e t i m e s r a t h e r t h a n s i m p l y c o p y a d i s k , y o u ' l l w a n t to p r e p a r e a d a t a d i s k f o r y o u r s y s t e m . T h e n later y o u c a n c o p y s e l e c t e d files to this d a t a d i s k . F o r m a t your s e c o n d blank disk b y using the F O R M A T c o m m a n d : F O R M A T D R I V E dfO: N A M E " A n y N a m e " F o l l o w t h e i n s t r u c t i o n s . Y o u c a n f o r m a t d i s k e t t e s in e i t h e r d r i v e 0 (dfO:, b u i l t in to y o u r A m i g a ) or a n e x t e r n a l d r i v e . A f t e r t h e f o r m a t is c o m p l e t e d , w a i t for t h e d i s k activity l i g h t to g o off a n d
AMIGADOS USER'S MANUAL
26
r e m o v e t h e f r e s h l y f o r m a t t e d d i s k e t t e . R e i n s e r t y o u r W o r k b e n c h or C L I d i s k e t t e . T h e f o r m a t t e d d i s k e t t e c a n n o w b e u s e d to h o l d d a t a files. It is n o t bootable, however.
Making a Disk Bootable T o try t h i s c o m m a n d , y o u r W o r k b e n c h or C L I d i s k e t t e c o p y s h o u l d b e in d r i v e 0. a n d y o u should h a v e your freshly formatted disk available. T h e r e a r e s e v e r a l d i f f e r e n t w a y s t o c r e a t e a C L I d i s k e t t e . T w o of t h e s e w a y s are s h o w n below. A b o o t a b l e d i s k is o n e t h a t y o u c a n u s e to start u p y o u r A m i g a f o l l o w i n g t h e Kickstart process. Y o u can c h a n g e a formatted disk into a CLI disk b y typing the command: INSTALL ? Note: to use this c o m m a n d on a single drive s y s t e m , you M U S T u s e the q u e s t i o n m a r k ! O t h e r w i s e A m i g a D O S will try t o d o t h e install o n t h e d i s k c u r r e n t l y in d r i v e 0. AmigaDOS responds: DRIVE/A R e m o v e y o u r W o r k b e n c h diskette copy and insert the formatted disk. T h e n type: dfO: a n d p r e s s R E T U R N . A m i g a D O S c o p i e s b o o t s e c t o r s to t h e d i s k e t t e . N o w , if y o u w a i t u n t i l t h e d i s k activity light g o e s o u t , y o u c a n t h e n p e r f o r m a full r e s e t ( C T R L - A m i g a - A m i g a ) . W h e n t h e s y s t e m r e b o o t s , y o u will g o d i r e c t l y i n t o t h e CLI rather than into the Workbench. Your formatted diskette n o w contains a CLI a n d nothing else. This m e a n s that a l t h o u g h y o u s e e t h e i n t e r p r e t e r , it c a n ' t p e r f o r m a n y of t h e c o m m a n d s s h o w n in t h i s s e c t i o n . A C L I n e e d s s e v e r a l files b e f o r e its c o m m a n d s c a n b e p e r f o r m e d . A l l o f t h e c o m m a n d files a r e l o c a t e d i n t h e C d i r e c t o r y o f y o u r m a s t e r d i s k e t t e . T h e s e c o n d w a y to p r o d u c e a C L I d i s k g i v e s y o u a m o r e u s e f u l d i s k in t h a t it l e a v e s t h e C L I c o m m a n d d i r e c t o r i e s i n t a c t . H e r e is a s t e p - b y - s t e p p r o c e s s to c h a n g e a w r i t a b l e c o p y of a W o r k b e n c h d i s k e t t e i n t o a C L I d i s k e t t e : 1. C o p y y o u r W o r k b e n c h d i s k e t t e . 2. O p e n the CLI as described above. 3. Click the selection b u t t o n on the CLI w i n d o w a n d type the c o m m a n d :
INTRODUCING AMIGADOS
27
R E N A M E P R O M s / s t a r t u p - s e q u e n c e TO s / N O - s t a r t u p - s e q u e n c e N o w if y o u w a i t f o r t h e d i s k activity l i g h t t o g o off a n d p e r f o r m a full r e s e t , y o u r W o r k b e n c h d i s k e t t e c o p y will h a v e b e c o m e a C L I . T o r e s t o r e t h e W o r k bench, perform the rename again, but with the n a m e sequence reversed. You s e e , if A m i g a D O S c a n ' t f i n d a file w i t h t h e e x a c t n a m e " s t a r t u p - s e q u e n c e " in t h e " s " d i r e c t o r y , it will e n t e r c o m m a n d m o d e a n d w a i t f o r y o u to t y p e a command.
Relabeling a Disk B e f o r e y o u try t h i s c o m m a n d , y o u r W o r k b e n c h or C L I d i s k e t t e c o p y s h o u l d b e in d r i v e 0. If, a f t e r e i t h e r c o p y i n g or f o r m a t t i n g a d i s k e t t e , y o u a r e n o t s a t i s f i e d w i t h t h e v o l u m e n a m e y o u h a v e g i v e n it, y o u c a n c h a n g e t h e n a m e of t h e v o l u m e b y using the RELABEL command: relabel AnyName: DifferentName I n t h i s e x a m p l e , w e h a v e r e f e r r e d t o t h e d i s k e t t e w e j u s t f o r m a t t e d b y its v o l u m e n a m e . Y o u will b e a s k e d t o i n s e r t v o l u m e A n y N a m e i n t o a n y d i s k d r i v e s o t h a t R E L A B E L c a n r e l a b e l it. After this c o m m a n d completes, r e m o v e the diskette a n d reinsert y o u r W o r k b e n c h or CLI diskette. T h e diskette you removed n o w has the n e w n a m e .
Looking at the Directory B e f o r e y o u try t h i s c o m m a n d , y o u r W o r k b e n c h o r C L I d i s k e t t e c o p y s h o u l d b e in d r i v e 0. Y o u l o o k at t h e c o n t e n t s of a d i s k e t t e w i t h t h e c o m m a n d : D I R o r D I R dfO: T h i s f o r m lists t h e c o n t e n t s of y o u r c u r r e n t d i r e c t o r y . Y o u c a n list t h e c o n t e n t s of a d i f f e r e n t d i r e c t o r y b y s p e c i f y i n g t h e p a t h n a m e for t h a t d i r e c t o r y . F o r example, the c o m m a n d : D I R dfO:C o r D I R c lists t h e c o n t e n t s of t h e c(dir) o n d r i v e dfO. D i r e c t o r i e s a r e e q u i v a l e n t to t h e d r a w e r s y o u s e e w h e n t h e W o r k b e n c h s c r e e n is v i s i b l e . Y o u c a n l o o k at t h e d i r e c t o r y of a d i f f e r e n t d i s k u n i t , if y o u h a v e o n e , b y s p e c i f y i n g its n a m e . F o r e x a m p l e :
28
AMIGADOS USER'S M A N U A L
DIR dfl: lists t h e c o n t e n t s o f a d i s k e t t e i n s e r t e d i n d r i v e 1 ( t h e first e x t e r n a l d r i v e if y o u have one attached). Y o u c a n e v e n l o o k at t h e d i r e c t o r y of a d i s k e t t e t h a t i s n ' t c u r r e n t l y i n t h e d r i v e b y s p e c i f y i n g its v o l u m e n a m e . F o r e x a m p l e , t h e c o n t e n t s of t h a t f r e s h l y formatted diskette w h o s e n a m e w e changed can be displayed b y the c o m m a n d : DIR DifferentName: A m i g a D O S will a s k y o u to i n s e r t d i s k e t t e D i f f e r e n t N a m e i n t o t h e d r i v e s o t h a t D I R c a n r e a d it a n d r e p o r t t h e c o n t e n t s of t h e d i r e c t o r y . D o n ' t d o it y e t , h o w e v e r , b e c a u s e t h e r e a r e n o files p r e s e n t f o r D I R to r e a d . W e ' l l a d d s o m e files l a t e r .
Using the LIST Command T o try t h i s c o m m a n d , y o u r W o r k b e n c h or C L I d i s k e t t e c o p y s h o u l d b e i n d r i v e 0. T h e D I R c o m m a n d tells y o u t h e n a m e s of files t h a t a r e i n y o u r d i r e c t o r y . T h e L I S T c o m m a n d p r o v i d e s a d d i t i o n a l i n f o r m a t i o n a b o u t t h o s e files. T y p e t h e command: L I S T o r L I S T dfO: A m i g a D O S p r o v i d e s i n f o r m a t i o n a b o u t all files in t h e c u r r e n t d i r e c t o r y , i n c l u d i n g h o w l a r g e e a c h file i s , w h e t h e r it m a y o r m a y n o t b e d e l e t e d , w h e t h e r it is a file o r a d i r e c t o r y , a n d t h e d a t e a n d t i m e of its c r e a t i o n . If y o u s p e c i f y t h e n a m e of a d i r e c t o r y w i t h L I S T , it lists i n f o r m a t i o n a b o u t t h e files w i t h i n t h a t d i r e c t o r y : LIST c T h e " r w e d " a r e called p r o t e c t i o n f l a g s , for r e a d , w r i t e , e x e c u t e , a n d d e l e t e . W h e n e a c h flag is s e t , u s i n g t h e P R O T E C T c o m m a n d , a file is s u p p o s e d t o b e r e a d a b l e , writable, e x e c u t a b l e , or deleteable. A s of t h e c u r r e n t r e l e a s e , A m i g a D O S o n l y p a y s a t t e n t i o n t o t h e d e l e t e - f l a g . If t h e " d " d o e s n ' t s h o w u p in t h e " r w e d " c o l u m n for a f i l e n a m e , A m i g a D O S w o n ' t d e l e t e t h a t file d u r i n g a DELETE command.
29
INTRODUCING AMIGADOS
Using the Protect Command T o try t h i s c o m m a n d , y o u r W o r k b e n c h o r C L I d i s k e t t e c o p y s h o u l d b e in d r i v e 0. T h i s c o m m a n d p r o t e c t s (or u n p r o t e c t s ) a file f r o m b e i n g d e l e t e d a c c i d e n t a l l y . Try the c o m m a n d : DATE > myfile PROTECT myfile LIST myfile Y o u will s e e t h a t all of t h e p r o t e c t - f l a g s h a v e b e e n s e t t o "
" . N o w if y o u
try: DELETE myfile AmigaDOS responds: "Not Deleted - file is p r o t e c t e d f r o m deletion" T o r e e n a b l e d e l e t i o n o f t h e file: P R O T E C T m y f i l e d or P R O T E C T m y f i l e r w e d
Getting Information About the File System Y o u r W o r k b e n c h or C L I d i s k e t t e c o p y s h o u l d still b e in d r i v e 0. T y p e command:
the
INFO It tells y o u h o w m u c h s p a c e is u s e d a n d h o w m u c h is free o n y o u r d i s k e t t e s , w h e t h e r t h e y a r e r e a d - o n l y or r e a d - w r i t e , a n d t h e n a m e of t h e v o l u m e . Y o u c a n m a k e m o r e s p a c e o n t h e d i s k e t t e b y d e l e t i n g files. Y o u c a n c h a n g e t h e n a m e of t h e v o l u m e b y u s i n g t h e R E L A B E L c o m m a n d . If y o u w a n t to g e t i n f o r m a t i o n a b o u t a d i s k t h a t i s n ' t in y o u r s i n g l e - d r i v e at the m o m e n t , issue the c o m m a n d as: INFO ? AmigaDOS responds: none:
30
AMIGADOS USER'S M A N U A L
A m i g a D O S has loaded the I N F O c o m m a n d from your CLI disk a n d s h o w s y o u t h e t e m p l a t e for t h e c o m m a n d . T h e r e s p o n s e " n o n e : " s a y s t h a t y o u d o n ' t h a v e t o t y p e a n y t h i n g o t h e r t h a n a R E T U R N k e y t o h a v e it p e r f o r m t h e c o m m a n d . R e m o v e your C L I disk and insert the disk on which you want I N F O to o p e r a t e . W a i t f o r t h e d i s k activity light to g o o n a n d off. T h e n p r e s s R E T U R N . A m i g a D O S gives you I N F O about this other disk. This w o r k s for D I R as well as I N F O .
Changing Your Current Directory U n t i l n o w , w e h a v e o n l y s t a y e d at t h e " r o o t " or t o p m o s t h i e r a r c h i c a l level of t h e d i s k e t t e d i r e c t o r y . Y o u will f i n d m o r e i n f o r m a t i o n a b o u t t h e d i r e c t o r y t r e e structure in section 1.3 of this m a n u a l . T o see the level at w h i c h y o u are currently positioned in your directory tree, y o u u s e the c o m m a n d : CD T o c h a n g e to a d i f f e r e n t c u r r e n t d i r e c t o r y , y o u tell t h e s y s t e m w h i c h d i r e c t o r y is t o b e c o m e t h e c u r r e n t o n e . F o r e x a m p l e , w h e n y o u did a " d i r " c o m m a n d o n dfO: t h e C L I d i s k e t t e y o u s a w a n e n t r y c(dir). If y o u w a n t to m a k e this d i r e c t o r y the current one, you issue the command: CD C o r CD dfO:c N o w w h e n y o u i s s u e t h e c o m m a n d D I R , it s h o w s t h e c o n t e n t s of this l e v e l of t h e filing s y s t e m . T h e c o m m a n d C D ( a l o n e ) s h o w s y o u t h e n a m e of y o u r c u r r e n t d i r e c t o r y . Y o u g o u p to t h e r o o t d i r e c t o r y ( t h e t o p level) b y s p e c i f y i n g : CD: o n t h e c u r r e n t v o l u m e (if y o u r e f e r to y o u r d i s k e t t e s b y v o l u m e n a m e ) o r CD dfO: o n t h e built-in drive.
Setting the Date and Time Y o u can set the A m i g a D O S clock b y using the D A T E c o m m a n d : D A T E 1 2 : 0 0 : 0 0 12-OCt-85 N o w t h e s y s t e m c l o c k c o u n t s u p f r o m this d a t e a n d t i m e .
INTRODUCING AMIGADOS
31
Redirecting the Output of a Command B e f o r e y o u try t h i s c o m m a n d , y o u r W o r k b e n c h or C L I d i s k e t t e s h o u l d b e i n d r i v e 0. N o r m a l l y t h e o u t p u t of all c o m m a n d s g o e s t o t h e m o n i t o r s c r e e n . Y o u c a n c h a n g e w h e r e the system puts the output b y using the redirect c o m m a n d " > " . T h e f o r w a r d a r r o w s y m b o l m e a n s s e n d t h e o u t p u t t o w a r d t h i s o u t p u t file name. Here's an example: DATE >
datefile
E x e c u t e t h e c o m m a n d s o t h a t y o u c a n u s e t h e datefile d e s c r i b e d b e l o w . T h i s c o m m a n d creates (or overwrites) a file n a m e d " d a t e f i l e " in y o u r c u r r e n t directory. O r , j u s t to h a v e s o m e t h i n g o n t h a t f o r m a t t e d d i s k e t t e n a m e d D i f f e r e n t N a m e , type the following: DATE >
DifferentName:datefile
A m i g a D O S p r o m p t s y o u to i n s e r t t h e v o l u m e w i t h t h a t n a m e . A f t e r t h e d i s k activity l i g h t g o e s o u t , r e m o v e D i f f e r e n t N a m e a n d r e i n s e r t y o u r C L I o r W o r k b e n c h diskette. N o w issue the c o m m a n d : DIR DifferentName: Again y o u are p r o m p t e d to insert DifferentName into any drive. A m i g a D O S lists t h e d i r e c t o r y of this d i s k e t t e , w h i c h n o w c o n t a i n s a file n a m e d d a t e f i l e . R e p l a c e y o u r C L I or W o r k b e n c h d i s k e t t e i n t h e d r i v e .
Typing a Textfile to the Screen Y o u c a n s e e t h e c o n t e n t s of a textfile b y u s i n g t h e T Y P E c o m m a n d : T Y P E datefile T h i s c o m m a n d will d i s p l a y w h a t e v e r y o u h a v e in t h e s p e c i f i e d file. If y o u w i s h to s t o p t h e o u t p u t m o m e n t a r i l y to r e a d s o m e t h i n g o n t h e s c r e e n , p r e s s t h e s p a c e b a r . T o restart it p r e s s t h e B A C K S P k e y . If y o u w i s h to e n d t h e T Y P E c o m m a n d , hold d o w n the CTRL key, and press the C key. If y o u w i s h to v e r i f y t h a t a n o t h e r d i s k e t t e a l s o h a s t h e datefile c o n t e n t s o n it, you can perform the command: TYPE DifferentName:datefile
AMIGADOS USER'S MANUAL
32
Changing the Name of a File Before y o u try this c o m m a n d , your W o r k b e n c h or CLI diskette copy should b e in d r i v e 0. Y o u c a n c h a n g e t h e n a m e of a file b y u s i n g t h e R E N A M E c o m m a n d : R E N A M E F R O M d a t e f i l e TO n e w n a m e or R E N A M E datefile n e w n a m e N o w use T Y P E to verify that the n e w n a m e refers to the same contents. TYPE newname Notice that the alternate form of the c o m m a n d doesn't require that y o u use t h e F R O M a n d T O . M o s t of t h e A m i g a D O S c o m m a n d s h a v e a n a l t e r n a t e f o r m , abbreviated from that s h o w n in this preface section. T h e longer form h a s b e e n u s e d p r i m a r i l y to i n t r o d u c e y o u to w h a t t h e c o m m a n d d o e s . B e s u r e to e x a m i n e t h e s u m m a r y p a g e s t o familiarize y o u r s e l f w i t h t h e a l t e r n a t e c o m m a n d forms that are available.
Deleting Files T o try t h i s c o m m a n d , y o u r W o r k b e n c h or C L I d i s k e t t e s h o u l d b e i n d r i v e 0. Y o u m a y b e w o r k i n g o n s e v e r a l v e r s i o n s of a p r o g r a m o r textfile, a n d e v e n t u a l l y w i s h t o d e l e t e v e r s i o n s of t h a t file t h a t y o u d o n ' t n e e d a n y m o r e . T h e D E L E T E c o m m a n d lets y o u e r a s e files a n d r e l e a s e s t h e d i s k s p a c e to A m i g a D O S for reuse. N o t e : If y o u D E L E T E files, it is n o t p o s s i b l e to r e t r i e v e t h e m . B e c e r t a i n t h a t y o u really d o w i s h t o d e l e t e t h e m . H e r e is a s a m p l e c o m m a n d s e q u e n c e , t h a t c r e a t e s a file u s i n g t h e r e d i r e c t i o n c o m m a n d , t y p e s it to v e r i f y t h a t it is really t h e r e , t h e n d e l e t e s it. DIR > directorystuff TYPE directorystuff DELETE directorystuff TYPE directorystuff T o t h e final c o m m a n d in t h e a b o v e s e q u e n c e , A m i g a D O S r e s p o n d s :
Cant Open directory-stuff i n d i c a t i n g t h a t t h e file c a n ' t b e f o u n d , b e c a u s e y o u d e l e t e d it.
INTRODUCING AMIGADOS
33
Copying Files Before y o u enter this c o m m a n d , your W o r k b e n c h or CLI diskette should b e in d r i v e 0. O n a d u a l - d r i v e s y s t e m , c o p y i n g files is e a s y : C O P Y F R O M d f O : s o u r c e p a t h TO d f l : d e s t i n a t i o n p a t h or COPY dfO:sourcepath d f l : d e s t l n a t i o n p a t h O n a s i n g l e - d r i v e s y s t e m , c o p y i n g files is a little m o r e c o m p l e x . Y o u m u s t c o p y c e r t a i n s y s t e m files f r o m y o u r s y s t e m d i s k e t t e i n t o t h e s y s t e m m e m o r y . T h i s is also called u s i n g t h e R A M : d e v i c e , o f t e n k n o w n a s a r a m d i s k . C o p y t h e file(s) t o t h e r a m d i s k , c h a n g e y o u r d i r e c t o r y to t h e r a m d i s k , t h e n c o p y f r o m t h e r a m d i s k o n t o t h e d e s t i n a t i o n d i s k e t t e . H e r e is a s a m p l e s e q u e n c e . B e s u r e y o u r W o r k b e n c h or C L I d i s k e t t e is i n t h e i n t e r n a l d i s k d r i v e . I s s u e the commands: C O P Y dfO:c/cd R A M : COPY ofO:c/copy R A M : CD R A M : I n s e r t t h e s o u r c e d a t a d i s k e t t e i n t o t h e d r i v e . ( F o r this e x a m p l e , c o p y s o m e t h i n g f r o m t h e W o r k b e n c h or C L I d i s k e t t e , w h i c h is a l r e a d y i n t h e d r i v e ) . Type: COPYdfO:c/executeram:execute or COPY dfO:c/execute e x e c u t e or COPY dfO:c/execute r a m : R e m o v e the source diskette, and insert the destination diskette into the drive. Type: COPY ram-.execute dfO:execute or C O P Y e x e c u t e d f O : e x e c u t e (If y o u d i d t h e CD R A M : t h i s f o r m w o r k s . ) R e m o v e t h e d e s t i n a t i o n d i s k e t t e a n d i n s e r t y o u r C L I or W o r k b e n c h d i s k e t t e again. Type:
34
AMIGADOS USER'S MANUAL
CD dfO: a n d y o u are b a c k w h e r e you started. T h e only other c o m m a n d y o u m a y w a n t t o p e r f o r m is: DELETE RAM:cd RAM:copy RAM:execute w h i c h r e l e a s e s t h e r a m d i s k m e m o r y t o t h e s y s t e m for o t h e r u s e s .
Creating a New Directory Y o u can create a n e w directory (newdrawer) within the current directory b y using the M A K E D I R command: MAKEDIR newdrawer N o w if y o u i s s u e t h e D I R c o m m a n d , y o u will s e e t h a t t h e r e is a n e n t r y for: newdrawer (dir) Y o u c a n a l s o u s e t h e R E N A M E c o m m a n d to m o v e a file f r o m o n e d i r e c t o r y ( d r a w e r ) to a n o t h e r o n t h e s a m e d i s k e t t e : MAKEDIR newdrawer R E N A M E F R O M n e w n a m e TO n e w d r a w e r / n e w n a m e m o v e s t h e file f r o m t h e c u r r e n t d i r e c t o r y i n t o t h e n e w d r a w e r y o u h a v e c r e a t e d . T o c h e c k t h a t it h a s really b e e n m o v e d , i s s u e t h e c o m m a n d : DIR T h e n type: DIR newdrawer AmigaDOS
l o o k s in t h e n e w d r a w e r ,
a n d s h o w s y o u t h a t t h e file
named
" n e w n a m e " is t h e r e .
Is My File Somewhere on This Disk? B e f o r e y o u e n t e r t h i s c o m m a n d , y o u r W o r k b e n c h or C L I d i s k e t t e c o p y s h o u l d b e i n d r i v e 0. S o m e t i m e s y o u w i s h to s e e e v e r y t h i n g o n t h e d i s k e t t e , i n s t e a d of
only
INTRODUCING AMIGADOS
35
o n e d i r e c t o r y at a t i m e . Y o u c a n u s e t h e D I R c o m m a n d w i t h o n e of its options: D I R OPT A w h i c h lists all d i r e c t o r i e s a n d s u b d i r e c t o r i e s o n t h e d i s k e t t e . K e e p in m i n d t h e < s p a c e > < B A C K S P > c o m b i n a t i o n to p a u s e a n d restart t h e listing. T o g e t a c l o s e r l o o k at t h e d i s k ' s c o n t e n t s , y o u m i g h t r e d i r e c t t h e o u t p u t t o a file: D I R > m y d i s k d i r OPT A Notice that the redirect-the-output c o m m a n d character and filename M U S T c o m e b e f o r e t h e list of o p t i o n s for t h e D I R c o m m a n d . N o w , if y o u w i s h , y o u c a n T Y P E t h e file m y d i s k d i r a n d p r e s s t h e s p a c e b a r to p a u s e t h e listing. U s e t h e R E T U R N k e y t o r e s u m e t h e listing. O r , y o u c a n u s e E D t o v i e w t h e file, as f o l l o w s : ED mydiskdir U s e t h e c u r s o r k e y s t o m o v e u p a n d d o w n i n t h e file. U s e t h e k e y c o m b i n a t i o n E S C t h e n T < R E T U R N > t o m o v e t o t h e t o p of t h e file. S u c h a c o m b i n a t i o n c a n b e r e f e r r e d t o as " E S C - T " , m e a n i n g E S C f o l l o w e d b y T. U s e t h e k e y c o m b i n a t i o n E S C - B < R E T U R N > t o m o v e t o t h e b o t t o m of t h e file. U s e the key combination E S C - M then a n u m b e r < R E T U R N > to m o v e to a specific line n u m b e r w i t h i n t h e file. U s e t h e k e y c o m b i n a t i o n E S C - Q < R E T U R N > to Q U I T w i t h o u t c h a n g i n g t h e file o r U s e E S C - X < R E T U R N > t o w r i t e a n y c h a n g e s to y o u r file b a c k i n t o t h e original file n a m e . C h a p t e r 3 of t h e AmigaDOS
User's Manual
has m o r e detailed information on
using ED.
Doing Something Automatically at Boot Time T h e r e is a file in t h e " s " s u b d i r e c t o r y o n y o u r W o r k b e n c h or C L I d i s k e t t e c a l l e d S t a r t u p S e q u e n c e . T h i s is a n e x e c u t e file. It c o n t a i n s a s e q u e n c e of C L I c o m m a n d s t h a t A m i g a D O S p e r f o r m s w h e n e v e r y o u r e b o o t t h e s y s t e m . T h e last t w o c o m m a n d s in y o u r W o r k b e n c h d i s k e t t e S t a r t u p S e q u e n c e a r e L o a d W b
36
AMIGADOS USER'S M A N U A L
(load t h e W o r k b e n c h p r o g r a m ) a n d E N D C L I w h i c h b a s i c a l l y l e a v e s t h e W o r k b e n c h p r o g r a m i n c o n t r o l . Y o u c a n m a k e u p y o u r o w n S t a r t u p S e q u e n c e file u s i n g E D o r E D I T to c r e a t e a c u s t o m v e r s i o n of a n e x e c u t e c o m m a n d s e q u e n c e . T h e E X E C U T E c o m m a n d s u m m a r y a n d t u t o r i a l s e c t i o n in t h e AmigaDOS User's Manual h a s details a b o u t v a r i o u s c o m m a n d s t h a t y o u c a n h a v e in t h i s file. N o t e t h a t S t a r t u p S e q u e n c e c a n also b e u s e d t o a u t o - r u n a program.
W A R N I N G : T a k e c a r e to m o d i f y o n l y a c o p y of y o u r d i s k e t t e never modify the master diskette if y o u d e c i d e to c h a n g e Startup Sequence.
the
Assigning the Diskette on Which AmigaDOS Looks for Things B e f o r e y o u e n t e r t h i s c o m m a n d , y o u r W o r k b e n c h or C L I d i s k e t t e c o p y s h o u l d b e in d r i v e 0. O c c a s i o n a l l y , y o u m i g h t w i s h to c h a n g e to a d i f f e r e n t d i s k e t t e a n d t h e n continue your work. For example, you may have booted the system using a W o r k b e n c h d i s k e t t e , t h e n w i s h to c h a n g e to a C L I d i s k e t t e . If t h e C L I d i s k e t t e h a s a d i r e c t o r y o n it t h a t c o n t a i n s t h e e x e c u t a b l e c o m m a n d s y o u w a n t t o p e r f o r m , (for e x a m p l e , a c(dir)), y o u c a n c h a n g e to t h a t d i s k e t t e b y u s i n g t h e ASSIGN command. If y o u d o n ' t u s e A S S I G N , y o u will h a v e to s w a p d i s k e t t e s t o g e t c o m m a n d s d o n e . H e r e is a n e x a m p l e t h a t d o e s n ' t u s e A S S I G N . T h e i n t e n t is to c h a n g e d i s k e t t e s a n d b e g i n u s i n g " m y d i s k : " as t h e m a i n d i s k e t t e . A n y u n n e e d e d files h a v e a l r e a d y b e e n d e l e t e d s o a s to p r o v i d e w o r k s p a c e . CD m y d i s k : A m i g a D O S r e s p o n d s " i n s e r t m y d i s k i n t o a n y d r i v e " . I n s e r t it, t h e n
type:
DIR A m i g a D O S p r o m p t s " i n s e r t W o r k b e n c h [or w h a t e v e r t h e b o o t d i s k e t t e n a m e w a s ] in a n y d r i v e " . It k n o w s , f r o m b o o t t i m e , t h a t t h e D I R c o m m a n d is in t h e boot diskette, c directory. A m i g a D O S reads the DIR c o m m a n d , then asks " i n s e r t m y d i s k in a n y d r i v e " . A n y o t h e r A m i g a D O S c o m m a n d also r e s u l t s i n the n e e d for a diskette s w a p . To avoid this, u s e the A S S I G N c o m m a n d as follows: A S S I G N " c: m y d l s k : c
INTRODUCING AMIGADOS
37
A m i g a D O S a s k s " i n s e r t m y d i s k i n t o a n y d r i v e " . F r o m n o w o n , all c o m m a n d s to A m i g a D O S will b e s o u g h t f r o m t h e c o m m a n d (c) d i r e c t o r y of t h i s o t h e r d i s k e t t e a n d A m i g a D O S w o n ' t a s k f o r t h e original d i s k e t t e b a c k f o r simple commands. O n c e y o u ' v e d o n e t h i s , y o u ' l l p r o b a b l y w a n t to t y p e : CD m y d i s k : T h e r e a r e o t h e r t h i n g s t h a t A m i g a D O S c a n a s s i g n . If y o u i s s u e t h e c o m m a n d ASSIGN LIST y o u will s e e t h e o t h e r t h i n g s as w e l l . If y o u r u n a p r o g r a m t h a t r e q u i r e s a serial d e v i c e ( m o d e m , p r i n t e r ) o r a parallel d e v i c e ( p r i n t e r ) , A m i g a D O S l o o k s i n t h e d i r e c t o r y c u r r e n t l y a s s i g n e d to D E V S : to locate t h e d e v i c e . If all of t h e s y s t e m d i r e c t o r i e s a r e o n this n e w m a i n d i s k e t t e , y o u c a n a v o i d h a v i n g A m i g a D O S a s k y o u t o r e i n s e r t t h e original d i s k e t t e b y p r o v i d i n g a n e x e c u t e file o n y o u r d i s k e t t e s t h a t r e a s s i g n s all d e v i c e s t o t h a t d i s k e t t e . T h e c o n t e n t s of t h i s e x e c u t e file for a d i s k e t t e n a m e d " m y d i s k " a r e as f o l l o w s : ASSIGN ASSIGN ASSIGN ASSIGN ASSIGN ASSIGN
SYS: mydisk: S: m y d i s k : s DEVS: mydisk:devs L: m y d i s k : l FONTS: mydlsk:fonts LIBS: mydisk:libs
T o c r e a t e this e x e c u t e file, u s e t h e c o m m a n d : C O P Y F R O M * TO r e a s s i g n T h e n t y p e t h e a b o v e A S S I G N l i n e s . A f t e r y o u ' v e t y p e d t h e last l i n e , e n t e r t h e k e y c o m b i n a t i o n C T R L A w h i c h e n d s t h e file. T h e " * " s t a n d s f o r t h e k e y b o a r d a n d c u r r e n t C L I w i n d o w , s o t h i s m e t h o d of c r e a t i n g a file is o n e p o s s i b l e a l t e r n a t i v e t o u s i n g E D or E D I T .
Creating a New CLI A m i g a D O S is a m u l t i - t a s k i n g s y s t e m . Y o u c a n h a v e m u l t i p l e w i n d o w s o p e n at t h e s a m e t i m e , e a c h w i t h its o w n c u r r e n t d i r e c t o r y a n d e x e c u t i n g s e p a r a t e c o m m a n d s . Y o u create a n e w CLI by using the c o m m a n d N E W C L I : NEWCLI
38
AMIGADOS USER'S MANUAL
This o p e n s a separate w i n d o w , with a p r o m p t that identifies the current p r o c e s s . F o r e x a m p l e , if t h e first w i n d o w h a s a p r o m p t : 1> then the n e w CLI might have a prompt:
2> Y o u c a n m o v e t h e n e w w i n d o w a r o u n d , m a k e it b i g g e r , m a k e it s m a l l e r a n d s o o n . T o i s s u e c o m m a n d s t o t h e n e w C L I , click w i t h i n its w i n d o w . N o w a n y t h i n g y o u t y p e g o e s i n t o t h e w i n d o w w h e r e y o u clicked t h e s e l e c t i o n button most recently. Try the following: 1. C l i c k i n w i n d o w 1, t h e n t y p e : D I R dfO:c 2 . Q u i c k l y click i n w i n d o w 2 , a n d t y p e : INFO B o t h C L I s will w o r k at t h e s a m e t i m e to fulfill y o u r r e q u e s t s . T h i s d e m o n s t r a t e s t h e m u l t i - t a s k i n g capabilities of t h e A m i g a . N o t i c e t h a t y o u a r e n ' t l i m i t e d t o o n l y t w o C L I s , y o u c a n , if t h e r e is m e m o r y a v a i l a b l e , o p e n a s m a n y as 20 CLIs.
Closing a CLI Y o u f i n i s h w i t h a C L I a n d c l o s e its w i n d o w w i t h t h e c o m m a n d E N D C L I . Click t h e s e l e c t i o n b u t t o n of t h e m o u s e in t h e w i n d o w for t h e C L I y o u w i s h t o c l o s e , and type: ENDGLI T h a t ' s all t h e r e is to it.
Closing Comments T h e a b o v e s e r i e s of c o m m a n d d e s c r i p t i o n s i n t r o d u c e s y o u to t h e k i n d s of things y o u can do with A m i g a D O S c o m m a n d s from the CLI. T h e r e are several c o m m a n d s t h a t h a v e n ' t b e e n c o v e r e d in t h e a b o v e s e s s i o n at all. In a d d i t i o n ,
INTRODUCING AMIGADOS
39
m o s t of t h e c o m m a n d s d e s c r i b e d a b o v e h a v e o t h e r " t e m p l a t e s " ( w a y s y o u c a n e n t e r t h e c o m m a n d s ) a n d o p t i o n s that h a v e n ' t b e e n d e m o n s t r a t e d . C h a p t e r 2 of t h e AmigaDOS User's Manual c o n t a i n s a r e f e r e n c e s e c t i o n t h a t s h o w s t h e t e m p l a t e s for e a c h of t h e c o m m a n d s in A m i g a D O S . Y o u c a n l o o k at t h e d e s c r i p t i o n for e a c h c o m m a n d to f i n d m o r e i n f o r m a t i o n . O n c e y o u a r e f a m i l i a r w i t h t h e c o m m a n d s , a n d t h e f o r m s in w h i c h y o u c a n u s e t h e m , t h e q u i c k r e f e r e n c e listing at t h e e n d of t h e c h a p t e r will b e u s e f u l t o r e m i n d y o u of t h e c o m m a n d s t h a t are a v a i l a b l e .
1.7 Conventions Used In C h a p t e r 2 of t h i s m a n u a l , i n t h e " F o r m a t " d e s c r i p t i o n for t h e A m i g a D O S c o m m a n d s , y o u will f i n d t h e f o l l o w i n g n o t a t i o n s u s e d :
[ ]
I
*
I n d i c a t e s a p a r a m e t e r n a m e t h a t y o u s h o u l d fill in for this c o m mand. Example: E X E C U T E < c o m m a n d f i l e > w h e r e the n a m e of t h e c o m m a n d file is a r e q u i r e d p a r a m e t e r . S q u a r e b r a c k e t s a r e u s e d to i n d i c a t e t h a t a n i t e m is o p t i o n a l . It n e e d n ' t b e p r o v i d e d f o r t h e c o m m a n d to f u n c t i o n b u t , if p r o vided, conveys additional information to A m i g a D O S about h o w to p e r f o r m t h e c o m m a n d . E x a m p l e : Q U I T [ < c o d e > ] A vertical b a r tells y o u t h a t y o u c a n select o n e o r a n o t h e r of t h e a l t e r n a t i v e s t h a t a r e s e p a r a t e d b y t h e vertical b a r f o r a c o m m a n d . E x a m p l e : D I R [ O P T A 111 A I ] T h e e x a m p l e i n d i c a t e s t h a t y o u c a n c h o o s e A , I or A I for t h e s p e c i f i c a t i o n . I n d i c a t e s o n e - o r - m o r e o c c u r r e n c e s of a p a r a m e t e r n a m e ; if y o u supply more than one such parameter, individual parameters m u s t b e s e p a r a t e d b y at l e a s t o n e b l a n k s p a c e .
F o r A m i g a D O S C L I c o m m a n d s , u n l e s s s o m e f o r m of p u n c t u a t i o n , s u c h as a c o m m a or a p l u s - s i g n is actually i n c l u d e d in t h e c o m m a n d F o r m a t l i n e , y o u must always separate the parameters with blank spaces. Don't confuse the Format information with the " T e m p l a t e " for the c o m m a n d . T h e c o m m a n d t e m p l a t e is e x p l a i n e d in s e c t i o n 1.4.5 of t h e AmigaDOS User's Manual.
Chapter 2
AmigaDOS Commands T h i s c h a p t e r is d i v i d e d i n t o t w o p a r t s : t h e first p a r t d e s c r i b e s t h e u s e r c o m m a n d s available on the Amiga; the second describes the developer c o m m a n d s . T h e u s e r c o m m a n d s fall i n t o s e v e r a l c a t e g o r i e s : file utilities, C L I c o n t r o l , c o m m a n d sequence control, and system and storage m a n a g e m e n t . Part I prov i d e s a l p h a b e t i z e d c o m m a n d d e s c r i p t i o n s t h a t give t h e f o r m a t , t e m p l a t e , p u r p o s e , a n d s p e c i f i c a t i o n of e a c h c o m m a n d as w e l l as a n e x a m p l e of its u s e . Part 2 has the same organization. T h e c h a p t e r starts w i t h a list of unfamiliar terminology. A t t h e e n d of the c h a p t e r t h e r e is a q u i c k C o n t e n t s r e f e r e n c e card t h a t lists all t h e c o m m a n d s b y f u n c t i o n . 2.1 2.2 2.3
AmigaDOS User's Commands AmigaDOS Developer's Commands A m i g a D O S C o m m a n d s Quick Reference Card
2.1 AmigaDOS User's Commands Unfamiliar Terminology In t h i s m a n u a l y o u c o u l d f i n d s o m e t e r m s t h a t y o u h a v e n o t s e e n b e f o r e . T h e list b e l o w i n c l u d e s s o m e c o m m o n t e r m s t h a t a r e c o n f u s i n g if y o u a r e u n f a m i l iar w i t h t h e m . Boot
s t a r t u p . It c o m e s f r o m t h e e x p r e s s i o n " p u l l i n g y o u r s e l f u p b y your bootstraps."
Default
initial s e t t i n g o r , in o t h e r w o r d s , w h a t h a p p e n s if y o u d o n o t h i n g . S o t h a t , in this m a n u a l , " d e f a u l t " is u s e d t o m e a n " i n a b s e n c e of s o m e t h i n g e l s e " .
Device name
p a r t of a n a m e t h a t p r e c e d e s t h e c o l o n (:), f o r e x a m p l e , C O N : , D F O : , PRT:, and so forth.
AMIGADOS COMMANDS
41
File handle
a n i n t e r n a l A m i g a D O S v a l u e t h a t r e p r e s e n t s a n o p e n file or device.
Logical device
a n a m e you can give to a directory with A S S I G N that y o u can then use as a device n a m e .
Object code
b i n a r y o u t p u t f r o m a n a s s e m b l e r or c o m p i l e r , a n d input to a linker.
Reboot
restart.
Stream
a n o p e n file or d e v i c e t h a t is a s s o c i a t e d w i t h a file h a n d l e . F o r e x a m p l e , t h e i n p u t s t r e a m c o u l d b e f r o m a file a n d t h e o u t p u t s t r e a m c o u l d b e to t h e c o n s o l e d e v i c e .
System disk
a disk containing the W o r k b e n c h a n d c o m m a n d s .
Volume name
a n a m e y o u give to a p h y s i c a l d i s k .
binary
N o t e : C o m m a n d f o r m a t is e x p l a i n e d i n s e c t i o n 1.7; c o m m a n d t e m p l a t e is e x p l a i n e d in s e c t i o n 1 . 4 . 5 .
Format: [];[] Template: "command";"comment" Purpose: T o a d d c o m m e n t s to c o m m a n d l i n e s . Specification: T h e C L I i g n o r e s e v e r y t h i n g a f t e r t h e s e m i c o l o n (;). Examples: ;This line is only a c o m m e n t i g n o r e s t h e p a r t of t h e line c o n t a i n i n g " T h i s line is o n l y a c o m m e n t . " copy < f i l e > to prt: ; p r i n t t h e file c o p i e s t h e file t o t h e p r i n t e r , b u t i g n o r e s t h e c o m m e n t " p r i n t t h e f i l e . " See also:
EXECUTE
>< Format: Template: Purpose:
[>outputfilename][inputfilename][ " T O " < "FROM" "args" To direct c o m m a n d input a n d output.
42
AMIGADOS USER'S M A N U A L
Specification: Y o u u s e t h e s y m b o l s > a n d < t o d i r e c t t h e o u t p u t a n d i n p u t of a c o m m a n d . T h e d i r e c t i o n of t h e p o i n t of t h e a n g l e b r a c k e t i n d i c a t e s t h e d i r e c t i o n of information flow. Y o u can u s e these symbols to change w h e r e any c o m m a n d reads input or writes output. T h e output from a c o m m a n d usually goes to the c u r r e n t w i n d o w . H o w e v e r , if y o u t y p e a > s y m b o l after a c o m m a n d a n d b e f o r e a f i l e n a m e , t h e c o m m a n d w r i t e s t h e o u t p u t to t h a t file i n s t e a d . S i m i l a r l y , if y o u t y p e t h e < s y m b o l b e f o r e a f i l e n a m e , t h e c o m m a n d r e a d s f r o m t h a t file i n s t e a d of f r o m t h e k e y b o a r d . Y o u d o n o t h a v e to s p e c i f y b o t h t h e T O a n d F R O M d i r e c t i o n s a n d files. T h e e x i s t e n c e a n d n u m b e r of " a r g s " d e p e n d s o n t h e c o m m a n d y o u u s e d . R e d i r e c t i o n o n l y h a p p e n s f o r t h e c o m m a n d y o u s p e c i f i e d . A m i g a D O S r e v e r t s to t h e initial or " d e f a u l t " i n p u t a n d o u t p u t (that i s , t h e k e y b o a r d a n d c u r r e n t w i n d o w ) a f t e r w a r d . N o t i c e t h a t r e d i r e c t i o n m u s t precede t h e a r g u m e n t s . Examples: DATE >
dlary_dates
w r i t e s t h e o u t p u t of t h e D A T E c o m m a n d (that is, t o d a y ' s d a t e a n d t i m e ) t o t h e file " d i a r y dates". my
program < my
tells m y program keyboard.
input
to accept i n p u t f r o m m y
input instead
of f r o m
the
LIST > temp S O R T t e m p TO * p r o d u c e s a s o r t e d list of files a n d d i s p l a y s t h e m o n t h e s c r e e n . T h e following sequence: ECHO > 2nd.date 0 2 - j a n - 7 8 DATE < 2nd.date ? DELETE 2nd.date c r e a t e s a file called 2 n d . d a t e t h a t c o n t a i n s t h e text " 0 2 - j a n - 7 8 < l i n e f e e d > " . N e x t it u s e s t h i s file as i n p u t to t h e c o m m a n d D A T E . N o t e t h a t t h e " ? " is n e c e s s a r y for D A T E to accept input from the standard input, rather t h a n the c o m m a n d l i n e . F i n a l l y , a s y o u n o l o n g e r n e e d t h e file, t h e D E L E T E c o m m a n d d e l e t e s 2nd. date.
AMIGADOS COMMANDS
43
ASSIGN Format:
ASSIGN
[[]][LIST]
Template: ASSIGN "NAME,DIR,LIS17S" Purpose: T o a s s i g n a logical d e v i c e n a m e to a filing s y s t e m d i r e c t o r y . Specification: N A M E is t h e logical d e v i c e n a m e g i v e n to t h e d i r e c t o r y s p e c i f i e d b y D I R . If y o u j u s t g i v e t h e N A M E , A m i g a D O S d e l e t e s t h e logical d e v i c e n a m e g i v e n (that i s , it r e m o v e s t h e a s s i g n m e n t ) . A S S I G N w i t h o u t a n y p a r a m e t e r s or t h e s w i t c h L I S T d i p l a y s a listing of all current assignments. W h e n y o u u s e A S S I G N , y o u m u s t e n s u r e t h a t t h e r e is a d i s k i n s e r t e d i n t h e d r i v e . T h i s is i m p o r t a n t b e c a u s e A S S I G N m a k e s a n a s s i g n m e n t t o a d i s k v o l u m e and not to a drive. N o t e t h a t t h e effect o f A S S I G N is lost w h e n y o u r e s t a r t o r " r e b o o t " y o u r computer. Examples: ASSIGN sources: :new/work S e t s u p t h e logical d e v i c e n a m e " s o u r c e s " to t h e d i r e c t o r y " : n e w / w o r k " . T h e n t o g a i n a c c e s s t o files in " : n e w / w o r k " , y o u c a n u s e t h e logical d e v i c e n a m e " s o u r c e s " , as in TYPE sources:xyz w h i c h d i s p l a y s t h e file " : n e w / w o r k / x y z " . ASSIGN LIST lists t h e c u r r e n t logical d e v i c e n a m e s in u s e .
BREAK Format: BREAK [ALL][C][D][E][F] Template: BREAK "TASK/A,ALL/S,C/S,D/S,E/S,F/S" Purpose: T o set a t t e n t i o n flags i n t h e g i v e n p r o c e s s . Specification: B R E A K s e t s t h e s p e c i f i e d a t t e n t i o n flags i n t h e p r o c e s s . C s e t s t h e C T R L - C flag, D s e t s t h e C T R L - D flag, a n d s o o n . A L L sets all t h e flags f r o m C T R L - C t h r o u g h
44
AMIGADOS USER'S MANUAL
C T R L - F . B y d e f a u l t , A m i g a D O S o n l y s e t s t h e C T R L - C flag. T h e a c t i o n o f B R E A K is i d e n t i c a l to s e l e c t i n g t h e r e l e v a n t p r o c e s s b y m o v i n g t h e m o u s e t o t h e w i n d o w , clicking t h e S e l e c t i o n B u t t o n , a n d p r e s s i n g t h e r e q u i r e d c o n t r o l key combination. Examples: BREAK 7 s e t s t h e C T R L - C a t t e n t i o n flag of p r o c e s s 7. T h i s is i d e n t i c a l t o s e l e c t i n g p r o c e s s 7 and pressing CTRL-C. BREAK 5 D s e t s t h e C T R L - D a t t e n t i o n flag of p r o c e s s 5 . BREAK 3 D E sets both C T R L - D a n d CTRL-E.
CD Format: Template:
CD[] CD "DIR"
Purpose: T o s e t o r c h a n g e a c u r r e n t d i r e c t o r y or d r i v e . Specification: C D w i t h n o p a r a m e t e r s d i s p l a y s t h e n a m e of t h e c u r r e n t d i r e c t o r y . In t h e f o r m a t list a b o v e , < d i r > i n d i c a t e s a n e w c u r r e n t d i r e c t o r y (that i s , o n e i n w h i c h u n q u a l i f i e d f i l e n a m e s a r e l o o k e d u p ) . If t h e d i r e c t o r y y o u s p e c i f y is n o t o n t h e c u r r e n t d r i v e , t h e n C D also c h a n g e s t h e c u r r e n t d r i v e . T o c h a n g e t h e c u r r e n t d i r e c t o r y t o t h e d i r e c t o r y t h a t o w n s t h e c u r r e n t o n e (if o n e e x i s t s ) , t y p e C D f o l l o w e d b y a single s l a s h (/). T h u s C D / m o v e s t h e current directory o n e level u p in the hierarchy unless the current directory is a r o o t d i r e c t o r y (that i s , t h e t o p level in t h e filing s y s t e m ) . M u l t i p l e s l a s h e s a r e a l l o w e d ; e a c h s l a s h r e f e r s to a n a d d i t i o n a l level a b o v e . Examples: CD d f l : w o r k s e t s t h e c u r r e n t d i r e c t o r y to " w o r k " o n disk " d f l " , a n d s e t s t h e c u r r e n t d r i v e to " d f l " .
45
AMIGADOS COMMANDS
CD S Y S : C O M / B A S I C CD / s e t s t h e c u r r e n t d i r e c t o r y to " S Y S : C O M " .
COPY Format:
COPY
[[FROM]][TO][ALL][QUIET]
Template: COPY "FROM,TO/A,ALL/S,QUIET/S" Purpose: T o c o p y a file o r d i r e c t o r y f r o m o n e p l a c e t o a n o t h e r . Specification: C O P Y p l a c e s a c o p y of t h e file o r d i r e c t o r y i n t h e file or d i r e c t o r y s p e c i f i e d a s T O . T h e p r e v i o u s c o n t e n t s of T O , if a n y , are l o s t . If y o u s p e c i f y a d i r e c t o r y n a m e a s F R O M , C O P Y c o p i e s all t h e files in t h e F R O M d i r e c t o r y to t h e T O d i r e c t o r y . If y o u d o n o t s p e c i f y t h e F R O M d i r e c t o r y , A m i g a D O S u s e s t h e c u r r e n t directory. T h e T O directory m u s t exist for C O P Y to w o r k ; it is n o t c r e a t e d b y C O P Y . If y o u s p e c i f y A L L , C O P Y a l s o c o p i e s t h e files i n a n y s u b d i r e c t o r i e s . I n t h i s c a s e , it a u t o m a t i c a l l y c r e a t e s s u b d i r e c t o r i e s in t h e T O d i r e c t o r y , a s r e q u i r e d . T h e n a m e of t h e c u r r e n t file b e i n g c o p i e d is d i s p l a y e d o n t h e s c r e e n a s it h a p p e n s u n l e s s y o u give t h e Q U I E T s w i t c h . Y o u c a n also s p e c i f y t h e s o u r c e d i r e c t o r y a s a p a t t e r n . I n this c a s e , A m i g a D O S c o p i e s a n y files t h a t m a t c h t h e p a t t e r n . S e e t h e c o m m a n d L I S T f o r a full d e s c r i p t i o n of p a t t e r n s . Y o u m a y s p e c i f y d i r e c t o r y l e v e l s a s w e l l a s p a t t e r n s . Examples: C O P Y f U e l TO : w o r k / f i l e 2 copies 'filel' in the current directory to " f i l e 2 " in the directory " : w o r k " . C O P Y TO d f l : b a c k u p c o p i e s all t h e files i n t h e c u r r e n t d i r e c t o r y t o " d f L b a c k u p " . It d o e s n o t c o p y a n y s u b d i r e c t o r i e s , a n d d f l : b a c k u p m u s t a l r e a d y exist. C O P Y dfO: t o d f l : A L L Q U I E T m a k e s a logical c o p y of d i s k " d f O " o n d i s k " d f l " w i t h o u t a n y r e f l e c t i o n filenames. COPY t e s t - # ? to dfl:xyz
i
of
46
AMIGADOS USER'S MANUAL
c o p i e s all files in t h e c u r r e n t d i r e c t o r y t h a t start " t e s t - " to t h e d i r e c t o r y x y z o n t h e d i s k " d f l " , a s s u m i n g t h a t " x y z " a l r e a d y e x i s t s . (For a n e x p l a n a t i o n of p a t t e r n s , s u c h a s " # ? " , s e e t h e c o m m a n d L I S T in this c h a p t e r . ) COPY t e s t _ f i l e to PRT: c o p i e s t h e file " t e s t
file" to your printer.
C O P Y * TO CON: 1 0 / 1 0 / 2 0 0 / 1 0 0 / C l i c k t h e w i n d o w t h a t y o u t y p e d t h e c o p y c o m m a n d i n t o . T h i s " r e a c t i v a t e s " it s o t h a t c o n s o l e i n p u t is t a k e n f r o m t h e r e . E v e r y t i m e y o u t y p e a l i n e it will b e displayed in the n e w w i n d o w . Press CTRLA w h e n you are d o n e a n d the n e w w i n d o w will c l o s e . C O P Y D F 0 : ? / # ? TO D F 1 : A L L c o p i e s e v e r y file in a n y o n e c h a r a c t e r s u b d i r e c t o r y of DFO: t o t h e r o o t d i r e c t o r y of D F 1 : . See also:
directory "peter", you would type "DFO:peter/project-report", no matter which directory ...... looks for files containing the text "Happy day" on the entire disk "dfO:".
This treatment of '\' is compatible with other awk implementations, and is ...... The awk program suitably massages the data and produces a word frequency table, ...
If no available graph template or data query applies to your ... occurs you may want to consult the section on debugging data queries to see why your data query ...
Aug 14, 2002 - Please note that The ARM-unit may only be transported in the ..... The ARM User's manual 500.012.1.009 - Chapter 1: The ARM-unit Manipulator. 7 ... The ARM may partly fold out if the wheelchair takes a turn at high speed. .... (pin-lay
Do not use scouring pads, powders, steel wool or abrasive paper to ... looking new for years to come, regularly apply a good quality, non-abrasive car wax to all ...
Do not use scouring pads, powders, steel wool or abrasive paper to clean this fixture. NOTE FOR FIXTURES THAT ARE SOLID BRASS: Your hand-crafted, solid ...
Introducing the Planes: The best introduction to the planes for low-level .... These advantages apply to travelers from other planes as ..... cosmology, there are four basic elements and two types of ...... Shadow to cover great distances on the Mate
Aircraft Repair --The Missing Manual ... Bendix Retard breaker magneto manual. 51 ..... or stop pulling out the alternate air door on run-up if the runway was dirty! ...... A mild steel bolt can handle small nicks, or a little bit of corrosion pittin
of gravity as a free action; this check can be made once per round. Any character ..... planes may stop spells based on their school, subschool, descriptors, or level. ...... The town has a reputation as a place where seers are born and where ...
For fixtures provided with 75° C or 90° C supply wire warning only. (These warnings are pro- .... Line art shown may not exactly match the fixture enclosed.
This manual may contain references to HP or Hewlett-Packard. Please ... the company name prefix: where a product number/name was HP XXXX the ... Page 45 ...
Jul 24, 1986 - you're loading from a floppy drive, insert your ORBITER backup disk into the drive. ..... walk-through, select Suspend from the Game pull-down.
manual. These symbols warn that there are no user serviceable parts inside the ..... Multi-level Security System ...... the old saying that you can never be too safe.
stone contributing editor and as horological consultant, British Horological. Vournal: ..... pointed steel spring on the pivot, you will notice that it will turn back and ...
OWNERS MANUAL. FOR THE JAZZ ... Please read this manual carefully before flying your JAZZ. Besides the ... collision or any material damage, a reserve system can safe your life. ... Due to the mechanic of the ..... Dive with extreme sink rate)! In ca
Jul 28, 2005 - because you fly with a safety system (i.e. do not take off!) .... (especially when packed airtight) starts a chemical reaction which weakens the ...
The 6-speed manual gearbox 08D can be combined with the following engines: Transmission ratio overview. â Installation position: Longitudinal. â Gear oil ...
or when you are standing on a wet or damp surface or in water. ⢠To reduce the risk of ... Reorient or relocate the receiving antenna. ⢠Increase the ... Magnet rotates 360° for attachment to vertical metal surfaces. Clings to most metal surface
All dangerous voltages are contained within the power supply unit which plugs directly into the mains electricity supply. If you suspect this unit of being faulty DO ...
In 1942 THE PACIFIC AIR WAR, you normally won't know who you're up ...... here, you control only one thing â the dorsal-mounted machine gun(s). Your.