Copyright (c) Hyperion Entertainment and contributors.
Difference between revisions of "AmigaOS Manual: AmigaDOS Command Examples"
Steven Solie (talk | contribs) |
Steven Solie (talk | contribs) |
||
Line 92: | Line 92: | ||
1> CD |
1> CD |
||
Workbench: |
Workbench: |
||
+ | |||
+ | == Changing the Search Path == |
||
+ | |||
+ | To Be Continued... |
Revision as of 19:28, 29 January 2014
The command examples elsewhere in this book are primarily to illustrate the proper syntax and general operation of AmigaDOS. This chapter shows you how to use the commands needed for a wide variety of common tasks.
The chapter is organized as follows:
- Basic tasks
- Occasional tasks
- Advanced tasks
Contents
Basic Tasks
This section is oriented toward the novice Shell user, showing commands and short scripts to accomplish basic tasks. Use the commands shown as models for your own commands, substituting the names of your disks, directories, and files. To use the commands, type what appears after the prompt (usually 1>). Press Return to enter the command line you type.
Opening a Shell Window
To open a Shell window from Workbench:
- Open the System drawer on your Workbench disk or partition.
- Double-click on the Shell icon.
OR
- Choose the Execute Command... item from the Workbench menu.
- In the requester that appears, enter the command NEWSHELL.
To open another Shell window from a Shell, enter the NEWSHELL command at a Shell prompt:
1> NEWSHELL
Running Programs from the Shell
To run a program that is on the search path, enter the program name at the prompt:
1> CLOCK
To run a program that is not on the search path, enter the full path to the program:
1> Tempus:Fugit/Utils/SuperClock
To run a program that is not on the search path but is in a subdirectory of the current directory, enter the relative path to the program:
1> Utils/SuperClock
Stopping a Program
AmigaDOS commands and most Workbench programs started from the Shell can be exited, or stopped if currently running, by pressing Ctrl+C. This is important in case you need to abort a pattern matching DELETE, or to interrupt a directory listing or other lengthy process. Scripts can be stopped with Ctrl+D.
To stop a command or program that is currently running:
- Make the Shell window from which the command or program was started the current window by clicking in it.
- Press Ctrl+C.
In some cases you may need to press Return after Ctrl+C to bring back the Shell prompt.
To stop a script that is currently running:
- Make the Shell window from which the script was started the current window by clicking in it.
- Press Ctrl+D.
Changing the Current Directory
The current directory is normally part of the standard Shell prompt, as in 1.Workbench:>. In the following examples, notice the prompt to see how the current directory changes.
To save typing, change the current directory to the one in which you are working.
If you are issuing two or more commands that refer to things in a certain directory, make it the current directory using the CD command. The following two sets of commands both accomplish the same task:
1.Work:> COPY Storage/Keymaps/usa2 TO DEVS:Keymaps 1.Work:> DELETE Storage/Keymaps/usa2 1.Work:> CD Storage/Keymaps 1.Storage:Keymaps> COPY usa2 TO DEVS:Keymaps 1.Storage:Keymaps> DELETE usa2
Entering the second set of commands instead of the first saves over a dozen keystrokes. This savings is even greater if further work in Storage/Keymaps is needed.
To change the current directory with as little typing as possible, omit the CD command, and use the slash and colon to move though the directory structure:
1.Workbench:Devs/Monitors> /Printers 1.Workbench:Devs/Printers> :Prefs/Presets 1.Workbench:Prefs/Presets> / 1.Workbench:Prefs>
To switch quickly between two current directories, use the PCD script (located in the S: directory):
1.Workbench:> PCD Devs/DOSDrivers 1.Workbench:Devs/DOSDrivers> Extras:Storage 1.Extras:Storage> PCD 1.Workbench:>
To see the current directory, if the Shell prompt does not show it, use the CD command alone:
1> CD Workbench:
Changing the Search Path
To Be Continued...