Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.
-
Upload
arron-mckenzie -
Category
Documents
-
view
215 -
download
0
Transcript of Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.
![Page 1: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/1.jpg)
Computer Systems
2009-2010
Week 11: The Command Line Interface
Alma Whitfield
![Page 2: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/2.jpg)
2
What we have done so far Files organised into directories Directories form a hierarchy Manipulated files using Windows
Windows Explorer
![Page 3: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/3.jpg)
3
What we are going to do today Examine the MS-DOS operating
system’s command line interface
Look at how MS Windows has developed from MS-DOS
![Page 4: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/4.jpg)
4
Organising files Thousands of files can be held in
secondary storage Organising the files is a job for the
operating system
![Page 5: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/5.jpg)
5
Operating systems An operating system is software
installed on the computer to make it possible to use it without needing a degree in electronic engineering
![Page 6: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/6.jpg)
6
Operating systems: mini-history Early machines had no operating
system – you needed to be an engineer to run a program Could only run one program at a time The CPU spent most of its time waiting
for hardware to complete tasks like printing or writing to or reading from disc
![Page 7: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/7.jpg)
7
Operating systems: mini-history By the 1960s, operating systems
could run several programs at the same time While one program is waiting for a read
from disc, another could be executing
![Page 8: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/8.jpg)
8
Operating systems: early 1980s Microsoft introduced PC operating
system called MS-DOS Microsoft Disc Operating System Disc operating system means file
organisation Instructions typed in at a command
line
![Page 9: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/9.jpg)
9
Operating systems: early 1980s Microsoft introduced PC operating
system called MS-DOS Microsoft Disc Operating System Disc operating system means file
organisation Instructions typed in at a command
line
![Page 10: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/10.jpg)
10
MS-DOS uses a Command Line Interface Do not use mouse Type in commands as words
i.e. lines of command Use a Command Prompt box
Start | Programs | Accessories | Command
Prompt Demo
![Page 11: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/11.jpg)
11
Entering MS-DOS commands Commands consist of
A single word Optional extra information e.g. c:\>ver
c:\>ping www.playboy.com
c:\>ping www.bbc.co.uk
![Page 12: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/12.jpg)
12
The current directory When using MS-DOS, it always places you
in a directory “Everybody has got to be somewhere” (Eccles
– the Goon Show – circa 1954) This is called the Current Directory The command prompt tells you what the
current directory is E.g. c:\windows\temp> …. means current directory is \windows\temp
on the c: drive
![Page 13: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/13.jpg)
13
Finding out what is in the current directory Use the dir command
E.g. c:\>dir
![Page 14: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/14.jpg)
14
Disc information
![Page 15: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/15.jpg)
15
Directory name
![Page 16: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/16.jpg)
16
Information about the files
in this directory
![Page 17: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/17.jpg)
17
Date and time file last changedp = pma = am
![Page 18: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/18.jpg)
18
<DIR> indicates these two items are directories
![Page 19: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/19.jpg)
19
This file is named win2k.xprIt is 189,624 bytes in size
![Page 20: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/20.jpg)
20
Total size of files in this directoryNumber of bytes still available on
the disc
![Page 21: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/21.jpg)
21
Changing drive in MS-DOS Demo Use drive name (A:, C: etc)
![Page 22: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/22.jpg)
22
File handling in MS-DOSCreate and edit text files edit
Display text files type
Change current directory cd
Make a new directory md
Remove a directory rd
Copy files from one directory to another directory
copy
![Page 23: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/23.jpg)
23
Using edit Demo Creating text files Editing text files
![Page 24: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/24.jpg)
24
Using copy Demo Using wildcards in copying c:\>copy *.txt c:\temp c:\>copy *.* c:\temp
![Page 25: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/25.jpg)
25
Using md to make directories Demo Building this directory structure c:\>md D c:\>md A c:\>cd D c:\D>md B c:\D>cd \ c:\>cd A c:\A>md D
![Page 26: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/26.jpg)
26
Using cd Demo Moving up one level c:\>cd A c:\A> c:\A>cd .. c:\>
![Page 27: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/27.jpg)
27
Using cd with absolute and relative paths Absolute path:
starts with root c:\>cd \A\D c:\A\D> Relative path: starts
from current directory
c:\A\D>cd ..\..\D c:\D>
![Page 28: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/28.jpg)
28
Batch files Batch files Collecting batches of commands
into one command Like a macro in other applications
e.g. Word, Excel
![Page 29: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/29.jpg)
29
A batch file example What directory
structure does this batch file create:
cd \
md A
md B
cd A
md C
![Page 30: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/30.jpg)
30
A second batch file example Write a batch file to
create this directory structure: cd \
md A
md B
md C
cd B
md D
![Page 31: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/31.jpg)
31
A third batch file example Write a batch file to
create this directory structure: cd \
md D
md A
cd D
md B
cd \A
md D
![Page 32: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/32.jpg)
32
Operating systems: early 1980s Apple Inc introduced first operating
system with a Graphical User Interface (GUI) Apple Lisa Apple MacIntosh Instructions issued using mouse clicks
on menus, and buttons
![Page 33: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/33.jpg)
33
Operating systems: early 1980s
![Page 34: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/34.jpg)
34
Operating systemsMicrosoft Windows family of operating
systems Windows Windows 95 Windows 98 Windows 2000 Windows XP Vista
![Page 35: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/35.jpg)
35
![Page 36: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/36.jpg)
36
A brief survey of Microsoft Windows Operating Systems http://www.youtube.com/watch?v=y48rthTbrA8
Also - flv file present locally
![Page 37: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/37.jpg)
37
Microsoft Windows has two streams Graphical front end to MS-DOS
Windows Windows 95 Windows 98
Not based on MS-DOS Windows 2000 Windows XP Vista
Streams look the same but completely different inside
A brief survey of Microsoft Windows Operating Systems
![Page 38: Computer Systems 2009-2010 Week 11: The Command Line Interface Alma Whitfield.](https://reader035.fdocuments.in/reader035/viewer/2022070400/56649f155503460f94c2ad51/html5/thumbnails/38.jpg)
38
Other PC Operating Systems Linux operating systems
Red Hat Linux SuSE Linux Mandrakesoft Linux etc
Competitor to Microsoft Based on Unix operating systems Originally had only command line
type interfaces Recent developments provide
graphical front ends