SHELL DOS
Shell DOS
KARAKTER *
Karakter asterik ( * ) digunakan oleh system sebagai pengganti
satu kata sembarang dari spesifikasi nama.
A:\>DIR *.COM
Volume in drive A is MSDOS 7.1
Volume Serial Number is 1BEB-401A
Directory of A:\
COMMAND
DISKCOPY
CHOICE
EDIT
FORMAT
MODE
MORE
SYS
COM
COM
COM
COM
COM
COM
COM
COM
8 file(s)
0 dir(s)
A:\>
1.1.2
KARAKTER ?
Karakter question sign atau tanda tanya ( ? ) digunakan
sebagai pengganti satu huruf sembarang dari spesifikasi nama.
Shell DOS
Achmad Darmal
A:\>DIR MO?E.COM
Volume in drive A is MSDOS 7.1
Volume Serial Number is 1BEB-401A
Directory of A:\
MODE COM
MORE COM
2 file(s)
0 dir(s)
A:\>
1.1.3
KARAKTER ^C
Karakter Ctrl+C atau karakter Break digunakan untuk
menghentikan jalannya suatu program yang sedang
berlangsung
1.1.4
KARAKTER ^Z
Karakter Ctrl+Z digunakan untuk menandai berakhirnya suatu
file.
Achmad Darmal
CLS
Perintah ini digunakan untuk membersihkan tampilan pada
layar komputer.
1.2.3
COPY
Perintah copy digunakan untuk meng-copy atau membuat
salinan satu atau lebih file ke suatu lokasi yang lain. Bentuk
umumnya adalah:
COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]]
[destination [/A | /B]] [/V] [/Y | /-Y]
source
/A
/B
destination
/V
/Y
/-Y
4
:
:
:
:
Achmad Darmal
DATE
Digunakan untuk mengubah tanggal pada system BIOS (Basic
Input Output System). Format pengisiannya adalah mm-dd-yy
atau bulan, tanggal, tahun.
A:\>DATE
Current date is Fri 12-10-2004
Enter new date (mm-dd-yy):
A:\>
1.2.5
DEL / ERASE
Berfungsi untuk menghapus file. Bentuk umumnya adalah:
Achmad Darmal
Shell DOS
08-15-05 1:31p .
08-15-05 1:31p ..
192 12-28-00 12:49p EDIT.INI
7,329 05-05-99 10:22p SCANDISK.INI
7,521 bytes
344,064 bytes free
A:\BOOT>
Shell DOS
Achmad Darmal
A:\BOOT>DEL *.INI
A:\BOOT>DIR
Volume in drive A is MSDOS710
Volume Serial Number is 0B30-1CF9
Directory of A:\BOOT
.
..
<DIR>
<DIR>
0 file(s)
2 dir(s)
08-15-05 1:31p .
08-15-05 1:31p ..
0 bytes
351,744 bytes free
A:\BOOT>CD..
A:\>
1.2.6
DIR
Perintah dir digunakan untuk melihat daftar isi sebuah
direktori. Bentuk umumnya adalah:
DIR [drive:][path][filename] [/P] [/W] [/A[[:]attributes]]
[/O[[:]sortorder]] [/S] [/B] [/L] [/V] [/4]
/P
/W
/A
/O
Achmad Darmal
/S
/B
/L
/V
/4
:
:
:
: berdasarkan
ekstensi
secara
alphabet
G : mengurutkan dengan kumpulan
direktori terlebih dahulu
A : berdasarkan
tanggal
akses
terakhir
S : berdasarkan ukuran file
D : berdasarakan tanggal file
- : Awalan yang berarti tidak/bukan
menampilkan file pada direktori
tertentu
beserta
sub-direktori
didalamnya
menampilkan file dan direktori dengan
format minimum tanpa menggunakan
informasi header dan summary.
menggunakan lowercase (huruf kecil)
menggunakan mode verbose (rinci)
menampilkan tahun dengan 4 digit.
Shell DOS
Achmad Darmal
A:\>DIR *.COM
Volume in drive A is MSDOS710
Volume Serial Number is 0B30-1CF9
Directory of A:\
FORMAT
COM
COMMAND COM
SYS
COM
DOSKEY
COM
MODE
COM
DOSLFN
COM
CHOICE
COM
DISKCOMP COM
DISKCOPY COM
EDIT
COM
MORE
COM
TREE
COM
12 file(s)
0 dir(s)
A:\>
1.2.7
Shell DOS
A:\>DIR /AD
Volume in drive A is MSDOS 7.1
Volume Serial Number is 1B06-223C
Directory of A:\
DATA
MSDOS71
0 file(s)
2 dir(s)
<DIR>
12-10-04 7:10p DATA
<DIR>
12-10-04 7:10p MSDOS71
0 bytes
94,720 bytes free
A:\>
1.2.8
PROMPT
Perintah ini digunakan untuk mengubah prompt pada DOS.
Bentuk umumnya adalah:
PROMPT [text] [code]
teks
code
Shell DOS
Achmad Darmal
1.2.9
Shell DOS
filename1]
filename1]
11
1.2.11 TIME
Digunakan untuk mengubah system waktu pada system BIOS.
Format pengisiannya adalah hh:mm:ss atau jam, menit, detik.
12
Shell DOS
Achmad Darmal
A:\>TIME
Current time is 7:40:39.88p
Enter new time:
A:\>
1.2.12 TYPE
Berfungsi untuk menampilkan isi file dalam format text.
Bentuk umumnya adalah:
Type [drive:][path] filename
Contoh, untuk menampilkan isi pada file MSDOS.SYS dapat
menggunakan perintah berikut ini:
A:\>TYPE MSDOS.SYS
A:\>TYPE MSDOS.SYS
;MS-DOS 7.10 System Configuration File
;(C)Copyright Microsoft Corp 1981-1999
[Options]
BootGUI=0
DisableLog=1
DoubleBuffer=0
Logo=0
SystemReg=0
;For compatiblity with Windows 9x GUI only:
[Paths]
windir=.
winbootdir=.
1.2.13 VER
Digunakan untuk menampilkan versi DOS atau versi
Windows yang digunakan. Contoh:
A:\>VER
Achmad Darmal
Shell DOS
13
A:\>VER
MS-DOS 7.1 [Version 7.10.1999]
1.2.14 VOL
Digunakan untuk menampilkan volume label atau nomor seri
dari sebuah drive. Contoh:
A:\>Vol
A:\>VOL
Volume in drive A is MSDOS 7.1
Volume Serial Number is 1BEB-401A
A:\>
ATTRIB
Perintah ini digunakan untuk melihat atau mengubah jenis
atribut pada suatu file. Bentuk umumnya adalah:
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:]
[path] filename] [/S]
+
R
A
S
14
Achmad Darmal
H
/S
1.3.2
Achmad Darmal
Shell DOS
15
C:\>CHKDSK
CHKDSK has NOT checked this drive for errors.
You must use SCANDISK to detect and fix errors on this drive.
Volume Serial Number is 2A2E-0FF5
13,369,040 kilobytes total disk space
4,272,240 kilobytes free
8,192 bytes in each allocation unit
1,671,130 total allocation units on disk
534,030 available allocation units on disk
655,360 total bytes memory
615,168 bytes free
Instead of using CHKDSK, try using SCANDISK. SCANDISK can
reliably detect and fix a much wider range of disk problems.
C:\>
1.3.3
DELTREE
Perintah ini digunakan untuk menghapus suatu direktori
beserta seluruh file dan sub-direktori didalamnya. Bentuk
umumnya adalah:
DELTREE [/Y] [drive:]path [[drive:]path[...]]
/Y
16
Shell DOS
Achmad Darmal
A:\>DELTREE DATA
Delete directory "DATA" and all its subdirectories? [yn] y
Deleting DATA...
A:\>
1.3.4
DISKCOPY
Perintah ini digunakan untuk membuat salinan dari suatu
disket sumber ke disket lain yang memiliki tipe atau jenis
yang sama. Bentuk umumnya adalah:
DISKCOPY [drive1: [drive2:]] [/1] [/V] [/M]
/1
/V
Shell DOS
17
Your computer has a disk larger than 512 MB. This version of MS-DOS
includes improved support for large disks, resulting in more efficient use
of disk space on large drives, and allowing disks over 2 GB to be
formatted as a single drive.
IMPORTANT: If you enable large disk support and create any new drives
on this disk, you will not be able to access the new drive(s) using other
operating systems, including some versions of Windows 95 and Windows
NT, as well as earlier versions of Windows and MS-DOS. In addition,
disk utilities that were not designed explicitly for the FAT32 file system
will not be able to work with this disk. If you need to access this disk with
other operating systems or older disk utilities, do not enable large drive
support.
Do you wish to enable large disk support (Y/N).? [Y]
Choice 1
Choice 2
18
Shell DOS
Achmad Darmal
Choice 3
Choice 4
1.3.6
FIND
Perintah ini digunakan untuk melakukan suatu pencarian
terhadap string (teks) pada satu atau beberapa file. Bentuk
umumnya adalah:
FIND [/V] [/C] [/N] [/I] string [[drive:] [path] filename [
...]]
/V
/C
/N
/I
string
Achmad Darmal
Shell DOS
19
1.3.7
FORMAT
Perintah ini digunakan untuk mempersiapkan disk agar bisa
digunakan. Bentuk umumnya adalah:
FORMAT drive: [/V[:label]] [/Q] [/F:size] [/B | /S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/T:tracks /N:sectors] [/B |
/S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/1] [/4] [/B | /S] [/C]
FORMAT drive: [/Q] [/1] [/4] [/8] [/B | /S] [/C]
/V
/Q
/F:size
/B
/S
/T:tracks
/N:sector
/1
/4
/8
/C
Shell DOS
Achmad Darmal
A:\>FORMAT A: /S
Insert new diskette for drive A:
and press ENTER when ready...
Checking existing disk format.
Verifying 1.44M
Format complete.
System transferred
Volume label (11 characters, ENTER for none)?
1,457,664 bytes total disk space
386,560 bytes used by system
1,071,104 bytes available on disk
512 bytes in each allocation unit.
2,092 allocation units available on disk.
Volume Serial Number is 1851-14E8
Format another (Y/N)?N
A:\>
1.3.8
MOVE
Perintah ini digunakan untuk memindahkan sekaligus
mengubah nama pada file atau direktori tujuan. Bentuk
umumnya adalah:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination
/Y
/-Y
Shell DOS
21
1.3.9
TREE
Perintah ini digunakan untuk menampilkan struktur direktori
atau path dengan menggunakan diagram pohon. Bentuk
umumnya adalah:
TREE [drive:][path] [/F] [/A]
/F
/A
1.3.10 SCANDISK
Perintah ini digunakan untuk melakukan pemeriksaan
terhadap suatu disk dan melakukan perbaikan apabila
22
Shell DOS
Achmad Darmal
Achmad Darmal
Shell DOS
23
1.3.11 SYS
Perintah ini digunakan untuk membuat salinan file system
MS-DOS pada disk yang telah ditentukan. Bentuk umumnya
adalah:
SYS [drive1:][path] drive2:
drive1:
: menentukan sumber file system
drive2:
: menentukan drive sebagai tujuan
penyalinan file system.
Contoh, untuk membuat salinan file system dari drive A pada
disket ke drive C pada harddisk, dapat menggunakan perintah
berikut:
A:\>SYS A: C:
A:\>SYS A: C:
System Transferred
A:\>
24
Shell DOS
Achmad Darmal
Sebagai contoh, berikut ini adalah file bat yang akan membuat sebuah
folder MYFOLD, melihat daftar file pada drive C dan menyimpannya
pada sebuah file text MYTEXT.TXT, kemudian langsung melihat isi
file text tersebut.
A:\>COPY CON C:\LATIH.BAT [Enter]
CLS [Enter]
CD C:\ [Enter]
CD\ [Enter]
MD MYFOLD [Enter]
DIR C:\ > C:\MYFOLD\MYTEXT.TXT [Enter]
TYPE C:\MYFOLD\MYTEXT.TXT
[Tekan tombol F6 atau Ctrl+Z kemudian tekan Enter]
Achmad Darmal
Shell DOS
25
26
Shell DOS
Achmad Darmal