Self-Test Linux/UNIX Fundamentals: Training & Consulting Training & Consulting
Self-Test Linux/UNIX Fundamentals: Training & Consulting Training & Consulting
Document: e0829test.fm
3 September 2019
The following questionnaire might help to check your personal knowledge of the various
topics discussed in the Linux/UNIX fundamentals course, in order to find out whether it is
useful for you to follow this course.
In this test, 20 questions are asked. For some questions, there is more than one correct
answer. In such cases this will be clearly indicated. A question is answered correctly only
if all correct answers are given.
You can find the right answers and guidelines for the evaluation at the end of this docu-
ment. Good luck!
O (a) hsh
O (b) csh
O (c) ksh
O (d) bash
[_][a] ls -ld a* b*
[_][b] ls -l-d a* b*
[_][c] ls -l -d a* b*
[_][d] ls -l a* -d b*
3. Consider the following commands which have been entered one after the other, and indicate
which output is generated by the last command.
$ mkdir a
$ cd a
$ ps > a
$ ls > b
$ cat b a
O (c) a
b
PID TTY TIME CMD
29362 pts/3 0:00 -ksh
92598 pts/3 0:00 ps
O (d) a
PID TTY TIME CMD
29362 pts/3 0:00 -ksh
92598 pts/3 0:00 ps
O (a) h-j-k-l
O (b) l-u-d-r
O (c) h-u-n-j
O (d) a-q-s-d
5. Give the name of the command which would compare two files and show its result in the fol-
lowing layout:
3c3
< Linux
---
> Unix
diff
Answer: ..........
6. I am in “vi” in command mode and I want to see the file list of a directory. For this I use the
following command: (Select the most efficient solution)
Look at the result below and answer the following three questions.
total 4
-rw-r--r-- 2 tb00029 staff 74 Dec 26 16:50 a
-rw-r--r-- 1 tb00029 staff 0 Dec 26 16:50 b
drwxr-xr-x 2 tb00029 staff 512 Dec 26 16:50 c
-rw-r--r-- 2 tb00029 staff 74 Dec 26 16:50 d
lrwxrwxrwx 1 tb00029 staff 1 Dec 26 16:51 e -> c
O (a) ls -l
O (b) ls -al
O (c) ls -pl
O (d) ls -pe
[_][a] >b
[_][c] cat | b
[_][d] touch b
O (a) >d
O (b) touch d
O (d) cp a d
O (e) ln a d
O (f) ln -s a d
10. Starting from any directory, which command must be entered to return immediately to one’s
home directory?
O (a) cd . <enter>
O (b) cd - <enter>
O (c) cd <enter>
11. To copy all files with names starting with ‘a’ into the subdirectory ‘c’, I enter the following com-
mand:
O (a) cp a* c
O (b) cp a? c/
O (c) cp a[*] c
O (d) mv a? /c/a
O (e) cp a* /c/a
O (f) mv a* c/
[_] [g] This is impossible with a single command. One needs a command to remove permis-
sions and one to add permissions back.
O (a) ps#date#hostname
O (b) ps|date|hostname
O (c) ps>date>hostname
O (d) ps;date;hostname
O (e) ps/date/hostname
$ ls <enter>
abc abc1 abc11 abc13 abc2 abc3
$ ls abc[135]<enter>
15. Which command permits to know how many login connections (result in digits only) are cur-
rently being used by user “root”?
Which command was used to initialise the variable ‘abc’ with bash or Korn shell?
O (b) abc=date
O (c) abc="date"
O (d) $abc=$date
O (e) abc=$(date)
O (f) abc=exec(date)
O (g) $abc=(date)
O (a) s&<enter>
ctrl-z
fg %1<enter>
stop %1<enter>
O (b) s&<enter>
ctrl-z<enter>
fg %1<enter>
stop %1<enter>
kill %1<enter>
O (c) s&<enter>
fg %1<enter>
ctrl-z
stop %1<enter>
kill %1<enter>
O (d) s&<enter>
ctrl-z<enter>
fg %1<enter>
kill %1<enter>
O (e) s&<enter>
fg %1<enter>
ctrl-z
kill %1<enter>
18. Which variant of the command “find” corresponds to the following search?
tb00029:!:202:1:Koen:/home/tb00029:/usr/bin/ksh
student1:!:297:103:Student 1:/opt/bmc/pem/u/student1:/usr/bin/csh
team00:!:203:205:Student 00:/home/curaix/team00:/usr/bin/ksh
team01:!:204:205:Student 01:/home/curaix/team01:/usr/bin/ksh
20. Give the name of the command that displays the documentation of an other command.
man
Answer: ..........