Gambar 50. DOS ( Disk Operating System ) |
This lesson provides an
introduction to DOS—a command-line operating system—and covers its basic
operations. You'll learn about its history, key commands, and how to manage
files and directories using DOS.
1. Introduction to DOS
What is DOS?
§
Definition: DOS stands for Disk Operating
System. It is an operating system that uses a command-line interface (CLI) to
execute commands.
§
Historical Context: Once widely used before the
rise of graphical operating systems like Windows, DOS was the foundation for
early personal computing.
§ Relevance Today: Although modern systems use graphical interfaces, understanding DOS helps you appreciate the fundamentals of computer operations and command-line functionality.
2. Getting Started with the DOS
Command Line
Opening DOS:
§
Booting into DOS: On older systems, DOS was
loaded during startup. Today, you can use Command Prompt on Windows or DOS
emulators like DOSBox.
§
Command Prompt: This is the interface where you
type commands. It usually displays a prompt (e.g., `C:\>`), waiting for user
input.
Basic Syntax:
§
Command Structure: DOS commands typically
consist of the command name followed by parameters and switches. For example:
```dos
DIR
/W
```
§
`DIR` is the command.
§
`/W` is an optional switch that modifies the
output format.
3. Basic DOS Commands
a.
File and Directory Navigation
1)
`DIR` – List Directory Contents:
§
Usage: `DIR`
§
Description: Displays a list of files and
subdirectories in the current directory.
§
Example:
```dos
C:\> DIR
```
2)
`CD` – Change Directory:
§
Usage: `CD [directory_name]`
§
Description: Changes the current working
directory.
§
Example:
```dos
C:\> CD Documents
```
3)
`MD` or `MKDIR` – Make Directory:
§
Usage: `MD [directory_name]`
§
Description: Creates a new directory.
§
Example:
```dos
C:\> MD Projects
```
4)
`RD` or `RMDIR` – Remove Directory:
§
Usage: `RD [directory_name]`
§
Description: Deletes an empty directory.
§
Example:
```dos
C:\> RD Projects
```
b. File Management
1)
`COPY` – Copy Files:
§
Usage: `COPY [source] [destination]`
§
Description: Copies files from one location to
another.
§
Example:
```dos
C:\> COPY file1.txt D:\Backup\
```
2)
`DEL` – Delete Files:
§
Usage: `DEL [filename]`
§
Description: Removes a file.
§
Example:
```dos
C:\> DEL unwanted.txt
```
3)
`REN` – Rename Files:
§
Usage: `REN [old_filename] [new_filename]`
§
Description: Renames a file.
§
Example:
```dos
C:\> REN oldname.txt newname.txt
```
4)
`TYPE` – Display File Contents:
§
Usage: `TYPE [filename]`
§
Description: Shows the contents of a text file.
§
Example:
```dos
C:\> TYPE readme.txt
```
4. Advanced DOS Commands
1)
`ATTRIB` – Change File Attributes:
§
Usage: `ATTRIB [+R|-R] [+A|-A] [+S|-S] [+H|-H]
[filename]`
§
Description: Modifies attributes like read-only,
archive, system, and hidden.
§
Example:
```dos
C:\> ATTRIB +R secret.txt
```
2)
`FORMAT` – Format a Disk:
§
Usage: `FORMAT [drive:]`
§
Description: Prepares a disk for use by erasing
all data and setting up a file system.
§
Example:
```dos
C:\> FORMAT D:
```
3)
`CHKDSK` – Check Disk for Errors:
§
Usage: `CHKDSK [drive:]`
§
Description: Scans the disk for errors and
displays a status report.
§
Example:
```dos
C:\> CHKDSK C:
```
5. Practical Tips for Operating
DOS
§ Tab Completion: Use the TAB key to automatically complete file and directory names.
§ Command History: Use the up and down arrow keys to cycle through previously entered commands.
§ Help Command: Type `HELP` to see a list of available commands, or `COMMAND /?` to get help for a specific command (e.g., `DIR /?`).
6. Exercises and Practice
Try the
following exercises to reinforce your understanding:
a. Navigate and List Files:
- Open the command prompt and navigate to a
directory of your choice.
- Use the `DIR` command to list all files
and directories.
b. Create and Remove a Directory:
- Create a new directory named `TestFolder`
using `MD`.
- Navigate into `TestFolder` with `CD` and
then move back.
- Remove `TestFolder` using `RD`.
c. File Operations:
- Copy a file from one directory to another.
- Rename the copied file.
- Display the content of the renamed file
using `TYPE`.
7. Summary
§ DOS Overview: DOS is a command-line operating system with a rich history and fundamental operations.
§ Core Commands: You learned to navigate directories, manage files, and use key commands like `DIR`, `CD`, `COPY`, `DEL`, and more.
§ Practice: Regular practice with these commands will build your proficiency in using DOS.
By mastering these basics, you
lay the groundwork for understanding more advanced command-line interfaces and
operating system fundamentals. Happy learning!
Referensi
Operate DOS ( Disk Operating System )
https://komunitassoftware.blogspot.com/p/operate-dos-disk-operating-system.html
Tidak ada komentar:
Posting Komentar
Catatan: Hanya anggota dari blog ini yang dapat mengirim komentar.