Title: Command line
1Command line
- A prompt where the user types in a command, as
opposed to using the mouse to perform a command. - Unlike a GUI Operating System, a command line
Operating System only uses a keyboard to navigate
and does not utilize a mouse. Because command
line Operating Systems require commands to be
used, these types of Operating Systems are much
more difficult to learn for new users and can
take time. - However, a command line Operating System can be a
very valuable resource and should not be ignored.
For example, users who have Microsoft Windows may
find trivial tasks such as renaming 100 files in
a folder a very difficult task however, this is
something that can be done in a matter of seconds
through a simple command at the command line.
2Microsoft DOS and command prompt
- Microsoft DOS is a command line user interface
first introduced in 1981 for IBM computers and
was last updated in 1994 when MS-DOS 6.22 was
released. - Although MS-DOS is not commonly used today, the
command shell used through Microsoft Windows is.
3How to open Dos Prompt Window
4(No Transcript)
5DOS TOP 10 COMMANDS
- 1.cd
- 2.dir
- 3.copy
- 4.del
- 5.edit
- 6.move
- 7.ren (rename)
- 8.deltree
- 9.cls
- 10.format
6cd to change directory
- cd\
- Goes to the highest level, the root of the drive.
7cd\
8Type cd\ then press enter
9- cd..
- Goes back one directory. For example, if you are
within the C\Windows\COMMANDgt directory, this
would take you to C\Windowsgt
10(No Transcript)
11 type ?cd..?press enter
12(No Transcript)
13- cd windows
- If folder present, would take you into the
Windows directory. Windows can be substituted
with any other name.
14Type cd..?press enter?type cd..?press enter?type
cd windows?press enter
15(No Transcript)
16- cd\windows
- If present, would first move back to the root of
the drive and then go into the Windows directory. - A shortcut to windowsbecause it goes back to the
root of the drive
17(No Transcript)
18- cd windows\system32
- If present, would move into the system32
directory located in the Windows directory. - If at any time you need to see what directories
are available in the directory you're currently
in use the dir command.
19Must be in C\ drive otherwise the command will
not work
20- cd
- Typing cd alone will print the working directory.
For example, if you're in c\windowsgt and you
type the cd it will print c\windows. For those
users who are familiar with Unix / Linux this
could be thought of as doing the pwd (print
working directory) command.
21(No Transcript)
22- About dir
- The dir command allows you to see the available
files in the current and/or parent directories.
23Type dir?press enter
24- dir /ad
- List only the directories in the current
directory. If you need to move into one of the
directories listed use the cd command. - dir /s
- Lists the files in the directory that you are in
and all sub directories after that directory, if
you are at root "C\gt" and type this command this
will list to you every file and directory on the
C drive of the computer. - dir /p
- If the directory has a lot of files and you
cannot read all the files as they scroll by, you
can use this command and it will display all
files one page at a time. - dir /w
- If you don't need the info on the date / time and
other information on the files, you can use this
command to list just the files and directories
going horizontally, taking as little as space
needed. - dir /s /w /p
- This would list all the files and directories in
the current directory and the sub directories
after that, in wide format and one page at a
time. - dir /on
- List the files in alphabetical order by the names
of the files. - dir /o-n
- List the files in reverse alphabetical order by
the names of the files.
25- About copy
- Allows the user to copy one or more files to an
alternate location.
26- Syntax
- Copies one or more files to another location.
- Examples
- The below example would copy all files in the
current directory to the floppy disk in drive a - copy . a
- Copy the autoexec.bat, usually found at root, and
copy it into the windows directory the
autoexec.bat can be substituted for any file(s). - copy autoexec.bat c\windows
27- Copy the win.ini file, which is already in your
windows directory, to the windows directory,
without prompting if you wanted to overwrite the
file or not. - copy win.ini c\windows /y
- Copy the contents in myfile2.txt and combine it
with the contents in myfile1.txt. - copy myfile1.txtmyfile2.txt
- Finally, a user can create a file using the copy
command. In the below example we create the file
called "test.txt". - copy con test.txt
- Once the above command has been typed in, a user
could type in whatever he or she wishes. When you
have completed creating the file, you can save
and exit the file by pressing CTRLZ, which would
create Z, and then press enter. An easier way to
view and edit files in MS-DOS would be to use the
edit command.
28Type copy con test1.txt?press enter?type what we
want in the text file?press enter?press ctrl
Z?press enter
29Test1.txt file appear in C directory
30(No Transcript)
31- About del
- Del is a command used to delete files from the
computer.
32- Windows 2000 and Windows XP recovery console
syntax - Deletes one file.
- Examples
- Notice Users who are running Microsoft Windows
95 and are used to deleted items going to the
recycle bin need to keep in mind that deleting
files from MS-DOS does not send files to the
recycle bin. - del test.tmp Deletes the test.tmp in the
directory that you currently are in, if the file
exists. - del c\windows\test.tmp Delete the
c\windows\test.tmp in the windows directory if
it exists. - del c\windows\temp\. ( is for wild
character(s)) . indicates that you would like
to delete all files in the c\windows\temp
directory. - del c\windows\temp\?est.tmp (? is a single
wild character for one letter) This command would
delete any file ending with est.tmp such as
pest.tmp or zest.tmp...
33Before delete
34Type del test1.txt?press enter
35After delete test1
36- About edit
- Edit allows a user to view, create and or modify
their computer files. - copy con ltname of filegt
- Once you have entered the above command this will
create the file with the name specified. - Once you have typed all the lines you wish to be
in the file, press and hold CTRL Z. This should
enter Z, once on the screen, press enter and one
file should be copied.
37(No Transcript)
38(No Transcript)
39(No Transcript)
40- Examples
- edit c\autoexec.bat This would look at the
autoexec.bat However, if the file is not found,
you will have a blank blue screen. When editing
this or any file, ensure that you know what you
are placing in the files. - Using edit you can also create files for
example, if you wanted to create a file called
myfile.txt, you would type - edit myfile.txt ltpress entergt
- This would bring up a blank edit screen, as long
as the file is saved upon exit this will create
the file myfile.txt.
41(No Transcript)
42(No Transcript)
43(No Transcript)
44(No Transcript)
45(No Transcript)
46(No Transcript)
47(No Transcript)
48(No Transcript)
49(No Transcript)
50(No Transcript)
51(No Transcript)
52(No Transcript)
53(No Transcript)
54(No Transcript)
55- About move
- Allows you to move files or directories from one
folder to another, or from one drive to another.
56- Examples
- move c\windows\temp\. c\temp - This would
move the files of c\windows\temp to the temp
directory in root, this is of course assuming you
have the windows\temp directory.
57Result file ipum.bmp dipindahkan ke testtt folder
58(No Transcript)
59- About ren and rename
- Used to rename files and directories from the
original name to a new name. - In earlier releases of MS-DOS instead of using
ren or rename you need to use the move command to
rename your MS-DOS directories or files.
60- Examples
- Rename the directory chope to hope.
- rename c\chope hope
- Rename all text files to files with .bak
extension. - rename .txt .bak
- Rename all files to begin with 1_. The asterisk
() in this example is an example of a wild
character because nothing was placed before or
after the first asterisk, this means all files in
the current directory will be renamed with a 1_
in front of the file. For example, if there was a
file named hope.txt it would be renamed to
1_pe.txt
61- About cls
- Cls is a command that allows a user to clear the
complete contents of the screen and leave only a
prompt.
62- Syntax
- CLS
- Examples
- cls
- Running the cls command at the command prompt
would clear your screen of all previous text and
only return the prompt.
63(No Transcript)
64(No Transcript)
65(No Transcript)
66- About format
- Format is used to erase all of the information
off of a computer diskette or fixed drive.
67- Microsoft Windows 2000 and Windows
- XP recovery console syntax
- Formats a disk for use with Windows 2000.
- format drive /q /fsfile-system
- drive Specifies the drive to format.
- /qPerforms a quick format.
- /fsfile-system-Specifies the file system to use
(FAT, FAT32, or NTFS)
68- Examples
- When using the format command, remember all
information on the drive you wish to format will
be completely erased. - format a
- Would erase all the contents off a disk. Commonly
used on a diskette that has not been formatted or
on a diskette you wish to erase. - format a /q
- Quickly erases all the contents of a floppy
diskette. Commonly used to quickly erase all
information on the diskette. - format c
- This would erase all the contents of your C hard
disk drive. In - other words, unless you wish to erase all your
computer's - information, this command should not be done
unless you're - planning to start over.
69User environments
70(No Transcript)
71(No Transcript)
72(No Transcript)
73(No Transcript)
74(No Transcript)
75(No Transcript)
76(No Transcript)
77(No Transcript)
78(No Transcript)
79(No Transcript)
80WINDOWS UPDATE
81History of windows
82(No Transcript)
83Click window update Internet explorer pop up ke
address website berikut http//www.microsoft.co
m/isapi/redir.dll?prdWin2000arWinUpdate
84(No Transcript)
85(No Transcript)
86(No Transcript)
87(No Transcript)
88Hands On
- Must show the knowledge of using DOS commands
such as - cd..
- dir
- copy con
- del
- edit
- Cls
- Each student need to show the ability to use the
command independently.