IT244: Introduction to Linux/UNIX – Fall 2010 Midterm Exam Review

advertisement
IT244: Introduction to Linux/UNIX – Fall 2010
Midterm Exam Review
For exam held Wednesday, 10/27/2010
Instructions
The topics listed below are given at a high level. It is your responsibility
to delve into each of these topics at the depth at which we dealt with
them in class. The topics here are the only ones from which questions
might appear on the exam. There is no need to spend any time on a
topic that does not fit under this list. Study hard.
NOTE: I will be giving questions on Chapter 6, since the general
understanding level in the homework was high. I am giving only a short
list of things that you need to know to be prepared for the exam. Also,
any specific information like, a list of special characters, will be given on
the exam sheet. Just understand how things work and what they do.
Topics
1) Command information using man vs. apropos (what does each do
and how are they different). Remember man –k is the same as
apropos.
2) User privileges and file permissions, including chmod ugo[+-]rwx
(we will not be dealing with ACL). Make sure you understand P.
114, Q. 10.
3) Processes (a process is a running command taking up memory
and CPU time and having a process id (PID) that can be used to
watch it (ps or pstree), or killed (kill)) and process information,
backgrounding and foregrounding processes; the use of the
operator ‘&’ vs. Ctrl-Z and the use of the jobs, bg, and fg
commands.
4) Tar for archiving – how do you create a tar file, how do you
display the list of archived files in a tar file, how do you extract a
tar file. What happens if the tar file was created using an absolute
path.
5) Standard input, output, error (what are the default devices and
how can you pipe and redirect to other devices); piping and
1
redirection defined and the difference between them; how to pipe
standard error to standard out and why you would want to do
that; and how to create vs. append to a file (with set –o noclobber
and >|); how to redirect for input from a device (file), what does
tee do for us, and the –a option for tee?
6) Text file commands – cat, grep, head, tail, sort, uniq, file, which
7) hierarchical filesystem, file naming both legal and quoted; hard
links and symbolic links; filename expansion by the shell before
starting a command process using *, ?, [].
8) home/working directory - ~, $HOME, ., .., root (/), inodes (data
structure [remember at least 5 bits of information an inode
contains] associated with an inode number which is kept in a
directory file along with an associated name), ls –i shows the
inode number.
9) filesystem commands: pwd, mkdir, rmdir, cd (includes -, ~), cp,
mv
10) PATH environment variable and how which uses that, as well as
how the shell uses that to find the executable file for a given
command.
11) Vim – what are the command, last line, and input modes; what is
:w, :q, :q!, wq, ZZ, and how are they different; show the vim
status with Ctrl-G (to see name of current file, status [modified,
readonly], current line and total number of lines, percentage into
the file, column number for the cursor position
12) Vim – inserting or changing text (r|R, u|U, x|X, i|I, a|A, o|O,
[num]cw, [num]cc, [num]yy, [num]yw, p) – especially how p acts
after each of these.
13) Vim – deleting text (<num>dd, <num>dw) and the
corresponding action when using the p command after one of
these.
2
Download