Академический Документы
Профессиональный Документы
Культура Документы
FINAL EXAMINATION
SECTION: _______________________________________
QUESTIONS
PART A MULTIPLE CHOICE 20 MARKS
PART B XWINDOWS / KDE 15 MARKS
PART C UNIX COMMANDS 20 MARKS
PART D SHORT ANSWERS 10 MARKS
PART E FILE MANAGEMENT 15 MARKS
TOTAL MARKS 80
SPECIAL INSTRUCTIONS:
1. If your telnet session in Matrix is not working properly, you should set the terminal emulation
setting to:
a) xterm
b) ascii
c) vt100
d) vt52
2. To search for short descriptions and manual names for the Unix command containing the
keyword “chat”, you issue the Unix command:
a) man chat
b) man –k chat
c) man –s chat
d) man –f chat
3. Which of the following Unix commands will provide information regarding a process that
you wish to terminate?
a) ps
b) process
c) <CTRL><c>
d) kill -9
5. Assuming that the user is currently in their home directory, which of the following Unix
commands will copy the entire contents of the user’s home directory (including subdirectory
contents) to a directory called ~/backup?
a) copy ~ ~/backup
b) cp –r ~ ~/backup
c) cp . ~backup
d) Both a and b
7. Which of the following Unix commands will display lines 3 to 7 of a 10 line file called fun
that is contained in your current directory?
a) The last 25 lines (sorted in alphabetical order) will be stored in file abc (overwriting
previous contents.
b) The last 25 lines (sorted in alphabetical order) will be appended to file abc.
c) Lines 25 to the bottom of the file will be appended to file abc.
d) Nothing will immediately happen.
a) 111011010101
b) 111001010100
c) 111111010110
d) 111000110111
10. Assume that the following Unix commands have just been issued:
umask 127
touch myfile
What are the permissions for the file myfile that was just created?
a) r – x r – x - - x
b) r - - r - - - - -
c) r w x r – x - - -
d) r w – r - - - - -
11.Assuming that you are in the vi editor in command mode, which of the following commands
will abort the current editing session?
a) Q
b) :q
c) ZZ
d) :q!
12. Which of the following Unix commands will display all lines in the file called report that
begin with 3 numbers?
13. Which of the following key-combinations will open a run dialog box within KDE?
a) <ALT><r>
b) <ALT><F3>
c) <ALT><F2>
d) <CTRL><ESC>
14. Which of the following key-combinations will move to the next virtual desktop (in
descending order)?
a) <SHIFT><CTRL><TAB>
b) <CTRL><TAB>
c) <CTRL><f>
d) <CTRL<F1>
16. Which of the following Linux applications can incorporate text and graphics?
a) Dia
b) Abiword
c) vi
d) both a and b
18. Which of the following Linux applications allow you to manipulate graphics?
a) Windows Explorer
b) K-edit
c) Konqueror
d) GIMP
1. For each of the following questions, fill in the blank with the appropriate term or
description. (4 marks)
1. ______________________________ 3. ______________________________
2. ______________________________ 4. ______________________________
2. Fill in the chart with the KDE shortcut key to perform the given operations.
(4 marks)
Tasks:
a. Copy the value on the calculator application List of Actions:
to the K-edit text editor. You can assume that
the calculator and the K-edit applications a. Press <CTRL><x>.
are already open. (2 marks) b. Point and click the application icon.
c. Press <ALT><F3>.
1. _________ d. Select the execute tab.
e. Press <ALT><F2>.
2. _________ f. Replace the filename with scores.html
in the name dialog box.
g. Enter the command ~/a.out in the
3. _________
command textbox.
h. Type ren grades.html scores.html.
4. _________ i. Point and click the value contained in
the calculator window.
b. Create an icon on the KDE desktop that will j. Move cursor to desired location within
run the program ~/a.out (3 marks) K-edit document and press
<CTRL><v>.
1. _________ k. Point and right-click on the file named
index.html.
2. _________ l. Point and click on OK.
m. Select rename from the context menu.
3. _________ n. Highlight the value in the calculator
window and press <CTRL><c>.
o. Select link to application from the
4. _________
context menu.
p. Press <ALT><TAB> until the K-edit
c. Rename the file grades.html to scores.html. application window is active.
You can assume that both of these files are q. Press <CTRL><p>.
contained in your current directory. (2 marks) r. Press <ALT><F1>.
s. Point and right-click on the desktop.
1. _________
2. _________
3. _________
4. _________
cat cars
chevy novass 79 60
ford mustang 65 45
volvo gl 78 102
ford ltd 83 15
chevy nova 80 50
honda accord 81 30
ford thundbd 84 10
chevy impala 65 85
ford bronco 83 25
Show the exact output (what is displayed) by each of the following Unix commands. Assume the
file cars is located in your current directory.
For questions 5 to 11, each question must be answered with a single Unix command, without
making use of the command separator character ; (semicolon). You can assume that all files are
contained in your current directory.
5. Write a single Unix command to save the current date and time into a file called current_date.
This file should only contain the current date and time. (1 mark)
6. Write a single Unix pipeline command to display a sorted list of all unique lines in a file
called phone_numbers.txt. (2 marks)
7. Write a single Unix pipeline command to display the total number of files begining with a
number, but not ending with two numbers. (2 marks)
8. Write a single Unix pipeline command to display only the file-type information for file types
called ascii (either uppercase or lowercase – 2 marks)
9. Write a single Unix pipeline command to display the number of times that you are logged
into the current server (make certain to use one environment variable - 2 marks)
10. Write a single Unix pipeline command to display only lines 7 to 14 for a file called “input”
contained in your current directory (2 marks)
11. Write a single Unix command to display all pathnames containing the utility grep or all
pathnames containing manual pages for the grep utility. (1 mark)
You are required to answer only 2 out of the following 4 questions. Your instructor will answer the
questions in order of appearance (including partially answered questions).
2. In point form, briefly describe the development of the Unix operating system and how it led
to the development of the Linux operating system. (5 marks)
4. List and explain 3 features of Unix that makes it different than MS-Windows.
(5 marks)
1. Write a single Unix command to add the following directory path starting from the
POD_RACER directory. (1 mark)
POD_RACER
|-- MANUALS
|-- PARTS
|-- FUSION
2. Write a single Unix command to allow the user obiwan to at least read the files in your
schedule directory. You can assume you have pass-through permissions in your home and
POD_RACER directories. (2 marks)
3. Write a single Unix command to copy all text files (i.e. files that end with an uppercase or
lowercase .txt ) in obiwan’s home directory to your home directory. Make certain that you do
not accidentally overwrite any of your files. (2 marks)
5. Write a single Unix command to create a file in your home directory called
pointers_obiwan.c that is a link to the file called pointers.c in obiwan’s home directory.
(2 marks)
6. Write a single Unix command to change the file called june.txt to july.txt. (1 mark)
7. Write a Unix pipeline command to display only directory filenames in your current directory.
(2 marks)
8. Write a single Unix command to list only directories contained in your home directory that
begin and end with two letters (either uppercase or lowercase – 2 marks).
9. Write a single Unix command to display the filenames in your current directory with a
description of the file type. (1 mark)