ITSC 1405 – Exam #1 (Chapters 1-4)

advertisement
ITSC 1405 – Final Exam – Part 3 (UNIX/Linux)
Intro to PC Operating Systems
Instructor: Prof. Michael P. Harris, CCNA, CCAI
rev. 20101207
Multiple Choice: (0.5 points each)
1. _____ Which UNIX/Linux directory contains the majority of executable files/commands?
a.
b.
c.
d.
/bin
/sbin
/usr/bin
all of the above
2. _____ In which UNIX/Linux directory will the users personal directorys be located?
a.
b.
c.
d.
/home/lib
/usr/bin
/home
/passwd
3. _____ Which UNIX/Linux directory will usually contain most of the system setup files?
a.
b.
c.
d.
/config
/etc
/sys
/usr/adm
4. _____In which UNIX/Linux directory will the hardware dependant files be located?
a.
b.
c.
d.
/dev
/sys
/bin
none of the above
5. _____ Which UNIX/Linux file is equivalent of the DOS CONFIG.SYS boot-up config file?
a.
b.
c.
d.
/unix
/etc/rc
/etc/startup
/etc/motd
6. _____ Which UNIX/Linux file usually contains the users’ daily login message?
a.
b.
c.
d.
/bin/login
/etc/motd
/usr/.profile
/etc/rc
ITSC 1405 Final Exam – Part 3
Page 2 of 4
7. _____ Which UNIX/Linux file usually contains the users account data?
a.
b.
c.
d.
/bin/passwd
/etc/var/profiles
/etc/passwd
/bin/var/profile
8. _____Which UNIX/Linux file contain a users personal startup and setup commands?
a.
b.
c.
d.
~/.profile
/usr/lib
/home/.profile
/etc/rc
9. _____ What are valid UNIX/Linux permissions for a file?
a.
b.
c.
d.
u g o a
r w x d s none of the above
10. _____ Which UNIX/Linux command changes file permissions?
a.
b.
c.
d.
chgrp
chown
chmod
none of the above
11. _____ What will the following UNIX/Linux command sequence do?
$ cat /etc/passwd | sort -r > wholist
a.
b.
c.
d.
sort user passwords into a file ‘wholist’
replace the ‘passwd’ file with the sorted ‘wholist’ file
create a sorted list of users into a file ‘wholist’
generate a syntax error
12. _____ What will the following UNIX/Linux command sequence do?
$ head +4 < wholist >> register
a.
b.
c.
d.
sort the registered users into a register file
Put all but the first 3 users in the file ‘wholist’ to the file ‘register’
Put the last 4 users in the file ‘wholist’ to the file ‘register’
generate a syntax error
13. _____ What will the following UNIX/Linux command do?
$ Ctrl-D
(^D)
a.
b.
c.
d.
shutdown UNIX
pause the UNIX screen display
refresh the UNIX screen display
logoff
ITSC 1405 Final Exam – Part 3
Page 3 of 4
14. _____ Which filename is not valid for UNIX/Linux?
a.
b.
c.
d.
e.
firstfile.txt
FIRSTFILE.TXT
first file
first/file
first!file
15. _____ Which of the following filenames are matched by: [A-G]*ing.?txt
a.
b.
c.
d.
e.
Gagging.test
Bing.xt
Aging.ntxt
Ing.etxt
Going.txt
16. _____ A UNIX/Linux file is hidden if:
a.
b.
c.
d.
It is owned by root and is read protected.
The name of the file begins with the character “.”
The chmod permission is set to 000
UNIX/Linux files cannot be hidden
17. _____ What UNIX/Linux command will display the entire contents of a file?
a.
b.
c.
d.
ls filename
grep filename
cat filename
sh filename
18. _____ What command would effectively make a file executable for all users?
a.
b.
c.
d.
chmod
chmod
chmod
chmod
u+x
ugo=xxx
ugo-rx
a+x
19. _____ What command displays the name of the UNIX/Linux machine you are using?
a.
b.
c.
d.
hostname
whoami
uname
logname
20. _____ Which UNIX/Linux command will show who is currently logged on?
a.
b.
c.
d.
ps -A
login
who
hostname
ITSC 1405 Final Exam – Part 3
Page 4 of 4
21. _____ Which UNIX/Linux command will show currently running processes?
a.
b.
c.
d.
uname -a
ps -A
whodo
runlevel
22. _____ The UNIX/Linux command cd ~ will do what?
a.
b.
c.
d.
Move to the top of the root directory
Move up three directory levels
Return to the prior directory
Return to your home directory
23. _____ The UNIX/Linux command ls –FRAC will?
a.
b.
c.
d.
Give an error message
Display a random Sci-fi expletive
Display a detailed directory structure and contents
Display UNIX/Linux system files with access attributes
24. _____ The UNIX command uname –a will?
a.
b.
c.
d.
Display the names of all the users
Display your current username
Display your computer name, os, os version, cpu, …
Display UNIX/Linux system files with access attributes
25. _____ The UNIX/Linux command tar –cvzf will?
a.
b.
c.
d.
Backup a file to tape
Display in columns, a verbose list of sorted filenames
Create a .tar file from a .tar.gz file
Create a compressed archive file with the extension .tar.gz or .tgz
26. _____ The UNIX/Linux command find . –type d will?
a.
b.
c.
d.
Give an error message
Find the word ‘type’ in any file in the current directory
Find all files the begin with ‘d’
Display a recursive list of all directories from the working directory
Download