Seuraavissa luvuissa käsitellään DOS-komentokehote työskentelyä ja DOS-komentoja. Lisäksi käsitellään mikrotietokoneen laitteistoa hyvin yleisesti.
KOMENTOSANA {/VALITSIMET} {PARAMETRIT}
KOMENTO /OPTIOT COPY /OPTIOT MISTA MINNE
Displays the name of or changes the current directory. CHDIR [/D] [drive:][path] CHDIR [..] CD [/D] [drive:][path] CD [..]
A: B: C: D: E: F: G: ...
Syntaksi: help komento tai komento /?
Esimerkki:
U:\> help rmdir
Removes (deletes) a directory.
RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path
/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a directory
tree.
/Q Quiet mode, do not ask if ok to remove a directory tree with /S
Syntaksi: mkdir hakemisto
Esimerkki:
U:\>mkdir prope U:\>
Syntaksi: cd hakemisto
Esimerkki:
U:\>cd prope U:\prope>
Syntaksi: dir tai dir hakemisto
Esimerkki:
U:\prope>dir
Volume in drive U is Offline
Volume Serial Number is 0000-0000
Directory of U:\prope
12.09.2001 13:57 <DIR> .
12.09.2001 13:57 <DIR> ..
12.09.2001 14:02 <DIR> demot
12.09.2001 13:58 19 demot.txt
1 File(s) 19 bytes
2 Dir(s) 7 382 913 024 bytes free
U:\prope>
Esimerkissä käytettävä hakemistorakenne:
U:.
+---prope
¦ demot.txt
¦
+---demot
Syntaksi: copy ..\mista ..\..\mihin
Esimerkki:
U:\prope>copy demot.txt demot
1 file(s) copied.
U:\prope>
copy C:\hakemistorakenne\mista U:\hakemistorakenne\mihin
Esimerkki:
U:\prope>copy U:\prope\demot.txt U:\prope\demot
Overwrite U:\prope\demot\demot.txt? (Yes/No/All): y
1 file(s) copied.
Syntaksi: rename vanha_nimi uusi_nimi
Esimerkki:
U:\prope>rename demot.txt juttuja.txt U:\prope>
Syntaksi: move tiedosto uusi_paikka
Esimerkki:
U:\prope>move juttuja.txt demot U:\prope>
U:\prope>move U:\prope\demot.txt U:\prope\demot\ U:\prope>
Syntaksi: del tiedosto
Esimerkki:
U:\prope\demot>del demot.txt U:\prope\demot>
Syntaksi: rmdir tyhja_hakemisto
Esimerkki:
U:\prope>rmdir demot The directory is not empty. U:\prope>del demot\* U:\prope\demot\*, Are you sure (Y/N)? y U:\prope>rmdir demot
Komentojen uudelleen suuntausta voidaan esimerkiksi käyttää..
Esimerkki, jossa laitetaan dir komennon tuloste tiedostoon listaus.txt
U:\prope>dir > listaus.txt
Esimerkki, jossa more-komennolla tarkastellaan listaus.txt tiedoston sisältöä.
U:\prope>more < listaus.txt
Komentojen putkituksen avulla voidaan antaa toisen ohjelman antama tulos toisen ohjelman syötteeksi.
Seuraavassa esimerkissä dir-komennon tuloste annetaan more-ohjelmalle, joka näyttää listauksen sivutettuna.
U:\prope>dir | more
| DOS | UNIX | TOIMINTA |
|---|---|---|
| DIR | ls -la | Näyttää hakemistolistauksen |
| CD | cd | Vaihtaa oletushakemiston |
| MKDIR | mkdir | Tekee hakemiston |
| RMDIR | rmdir | Tuhoaa tyhjän hakemiston |
| COPY | cp | Kopioi tiedostoja |
| TYPE | cat | Tulostaa tiedoston sisällön näytölle |
| RENAME | mv | Vaihdetaan tiedoston tai hakemiston nimi |
| DEL | rm | Tuhoaa tiedoston |
| MOVE | mv | Siirtää tiedoston uuteen paikkaan |
| EDIT | pico | Yksinkertainen tekstieditori |
| FORMAT | alustaa levyn tai levykkeen |
CTRL-C tai CTRL-BREAK
edit dokumentti
Valikon saa aktivoitua alt-näppäimellä. Aktivoinnin jälkeen valikoissa voi liikkua nuolinäppäimillä.
Keskusyksikkö voi esimerkiksi sisältää:
Keskusyksikköön voi esimerkiksi liittää ulkoisesti: