Ai - Exerceise 2
Ai - Exerceise 2
No:2 DATE:
Practicing important DOS Commands.
Software:
A set of Instructions is called a PROGRAM. Software refers to a group of such
programs related to a particular task. It causes the hardware to function in the desired way. A
system without software is of no use. Software can be categorized as:
1. System Software (BIOS, Operating System, Device Drivers).
2. Application and Utility programs
3. General purpose packages.
Operating system:
An operating System is a program that manages two interfaces; the interface between
the user and the application and the interface between the applications and the computer
devices and files. An operating system like DOS provides text base interface for the user.
Whereas an operating system like Microsoft Windows provides a graphical user interface
(GUI) for user. Operating systems such as Windows 7, 8, 10, and 11.
MS-DOS
MS-DOS short for Microsoft Disk Operating System is an operating system. Tim Paterson is
considered the original author of DOS and is called as "The Father of DOS”. Windows
operating systems continue to offer a DOS emulator. DOS commands can be categorized as
Internal Commands and External commands. Steps to open the command prompt in the
Windows operating system:
1. Go through the Start menu: click Start, All Programs, Accessories, and then click on
Command Prompt or;
2. In the run box type cmd.
Figure 2.1: DOS commands window
In the following table commands for DOS and Linux operating systems are given
Command's
MS-DOS Linux Basic Linux Example
Purpose
cp thisfile.txt
Copies files copy cp
/home/thisdirectory
mv thisfile.txt
Moves files move mv
/home/thisdirectory
Lists files dir ls ls
Clears screen cls clear clear
Closes shell prompt exit exit exit
Displays or sets date date date date
Deletes files del rm rm thisfile.txt
"Echoes" output to
echo echo echo this message
the screen
Edits files with
edit gedit([a]) gedit thisfile.txt
simple text editor
Compares the
fc diff diff file1 file2
contents of files
Finds a string of grep this word or phrase
find grep
text in a file thisfile.txt
format a: (if /sbin/mke2fs /dev/fd0
mke2fs or
Formats a diskette diskette is in (/dev/fd0 is the Linux
mformat([b])
A:) equivalent of A:)
Displays command
command /? man([c]) man command
help
Creates a directory mkdir mkdir mkdir directory
Views a file more less([d]) less thisfile.txt
Renames a file ren mv([e]) mv thisfile.txt thatfile.txt
Displays your
location in the file chdir pwd pwd
system
Changes directories
with a specified cd pathname cd pathname cd /directory/directory
path (absolute path)
Changes directories
cd .. cd .. cd ..
with a relative path
Displays the time time date date
Shows amount of
mem free free
RAM in use
3.CHDIR / CD
It changes or displays your current directory
4. RMDIR / RD
It removes an empty directory from the directory structure.
5) COPY
It copies one or more files to another location.
6) MOVE
It moves the file and renames files and directories.
7. RENAME / REN
Renames a file or files.
8. DEL / ERASE
It deletes one or more files.
9. DIR
Displays a list of files and subdirectories in a directory.
10. TYPE:
It displays the contents of a file on the console( Screen).
11. DATE:
It displays or sets the date (ie to display current date from system clock)
12. TIME
It displays the current time from system clock or sets the system time.
13. VER
It displays the MS-DOS version number
14. VOL
It displays the disk volume label and serial number, if it exist.
15. PROMPT
It changes the command prompt.
16. EXIT
Quits the CMD.EXE program (command interpreter) or the current batch
script.