Directions: Read each of the following statements. If you think a statement is true, select True. If you think a statement is false, select False.
1. The directory structure is arranged in levels and is known as a hierarchical
structure.
a. True
b. False
2. Your login name and your home directory name are usually the same.
a. True
b. False
3. Every UNIX file structures has a root directory named / (slash).
a. True
b. False
4. Files in your current directory are immediately accessible. Files on the other
directories must be identified by their pathnames.
a. True
b. False
5. Absolute and relative pathnames are the same and indicate the same pathname.
a. True
b. False
6. If you have just logged in, your home, current or working directories are
the same.
a. True
b. False
7. In UNIX filenames XYZ and xyz are indicating the same filename.
a. True
b. False
8. In UNIX filename extension is absolutely necessary.
a. True
b. False
9. The pwd command prints your working directory on the printer.
a. True
b. False
10. The cd command returns you to the root directory.
a. True
b. False
11. The invisible files are the files that only the owner can see.
a. True
b. False
12. You can use only one command option at a time on the command line.
a. True
b. False
13. You can use the vi editor or the cat command to look at the content of a file.
a. True
b. False
14. You can use the vi editor or the cat command to create a file.
a. True
b. False
15. After the print command is issued, there is no way to cancel the print job.
a. True
b. False
16. The rmdir command (with no options) can only remove empty directories.
a. True
b. False
17. The / at the beginning of a pathname stands for the root directory.
a. True
b. False
18. The name .HIDDEN is an example of a hidden file.
a. True
b. False
19. Y(dot) and .. (dot dot) represent the current and a level higher directories
respectively.
a. True
b. False
20. To cancel a print job, you only have to turn the printer off.
a. True
b. False
Directions:Match the following commands to the corresponding descriptions. Place the letter that indicates your answer on the line in front of each command.
a. absolute pathname to the file called xyz
b. changes the directory to the parent of the current directory
c. lists current directory files including the invisible files
d. sends xyz file to the line printer
e. deletes the directory called xyz
f. displays the content of the file called xyz
g. displays the current directory pathname
h. cancels the printing job on the lp1 printer
i. confirms the deletion of the xyz file before deleting it
j. lists the current directory in long format
k. lists files across the page separated by commas
l. changes the current directory to the HOME directory
m. removes all subdirectories and files under the current directory
n. shows name of the default printer
o. shows status of the printing requests
p. sends mail to the user mailbox after completion of the print request
q. prints on a specific (named) printer (Linux)
r. displays usage message for the rm command (Linux)
s. creates two levels of directories under the current directory
(Linux)
t. prints the specified title on the banner page (Linux)
21. _____ lp xyz
22. _____ cat xyz
23. _____ rm -i xyz
24. _____ /david/xyz
25. _____ cancel lp1
26. _____ ls -l
27. _____ cd ..
28. _____ ls -a
29. _____ rmdir xyz
30. _____ pwd
31. _____ lpstat -d
32. _____ rm --help
33. _____ lpr -p filename
34. _____ rm -r *
35. _____ lpstat
36. _____ ls -m
37. _____ cd
38. _____ mkdir --parent xx/yy
39. _____ lpr -T
40. _____ lp -m filename
Directions: Select the letter that indicates the best answer for the question.
41. The command to show your current directory pathname is
a. pcd
b. ls -a
c. pwd
d. lp pwd
e. ls pwd
42. The command to create a directory called xyz is
a. mkdir xyz
b. mk xyz dir
c. md xyz
d. dir xyz
e. MKDIR xyz
43. The command to delete a file called xyz with confirmation option is
a. del xyz
b. rm xyz
c. rm -c xyz
d. rm -i xyz
e. rm xyz -i
44. If your current directory pathname is /usr/david, the command ls ..
a. displays the current directory
b. lists files in the working directory
c. lists files in david directory
d. lists files in the usr directory
e. displays invalid command message
45. Which of the following commands is not a correct use of the options?
a. ls -amF
b. ls -a -C
c. lp -tHELLO xyz
d. ls a
e. all of the above
46. Which of the following filenames is not a correct filename?
a. XYZ.xyz
b. XYZ>> xyz
c. Xyz
d. X.Y.Z
e. all of the above
47. If your current directory is /usr/david, the command cd /changes your current
directory to
a. root
b. usr
c. david
d. /usr
e. none of the above
48. The command to print the files XYZ and xyz is
a. lp XYZ, xyz
b. print XYZ and xyz
c. P xyz, XYZ
d. lp XYZ xyz
e. lp -2 XYZ
49. The command to check the status of your print job is
a. lpstat printers
b. lpstat jobs
c. lpstat
d. lp status
e. status printers
50. Which one of the following pathnames is considered an absolute pathname?
a. absolute/xyz
b. /bin/usr/u/se-bin
c. david/memo/c
d. Y/../xyz
e. YY/xyz/xxx/memo
51. The command to print a file on a specific printer is
a. lp -d filename
b. lp filename printer-name
c. lp -d printer-name filename
d. print filename ptr1
e. p -d printer-name filename
52. The command to obtain the name of the default printer is
a. lpstat -d
b. lpstat printer-name
c. lp -d
d. print default ptr
e. printer
53. The Linux command to print on a specific (named) printer is
a. lpr -d filename
b. lpr filename printer-name
c. lpr -p printer-name filename
d. print filename ptr1
e. pr -d printer-name filename
54. The command to delete a directory and all the subdirectories and files in
it is
a. rm -r directory-name
b. rm directory-name
c. rm -all directory-name
d. rm -sub directory-name
e. rm all
55. The Linux command to delete a directory and all the subdirectories and files
in it is
a. rm --recursive directory-name
b. rm --r directory-name
c. rm --all directory-name
d. rm --sub directory-name
e. rm --all
56. The Linux command to obtain help screen for the rm command is
a. rm --h
b. rm --help
c. help rm
d. help --rm
e. rm help
57. The command to list a hierarchy of directories is
a. ls -R directory -name
b. ls -a directory -name
c. ls -all directory -name
d. ls -hierarchy 3directory -name
e. ls directory?name all
58. The Linux command to list a hierarchy of directories is
a. ls --R directory -name
b. ls --a directory -name
c. ls --all directory -name
d. ls --hierarchy directory -name
e. ls --recursive directory?name
59. The command to create 2 levels of directories is
a. mkdir -p level-1/level-2
b. mkdir -l level-1/level-2
c. mkdir -2 level-1/level-2
d. mkdir -h level-1/level-2
e. mkdir -p level-1 level-2
60. The Linux command to create 2 levels of directories is
a. mkdir --parent level-1/level-2
b. mkdir --l level-1/level-2
c. mkdir -l level-1/level-2
d. mkdir -hierarchy level-1/level-2
e. mkdir -p level-1 level-2
1. True
2. True
3. True
4. True
5. False
6. True
7. False
8. False
9. False
10. False
11. False
12. False
13. True
14. True
15. False
16. True
17. True
18. True
19. True
20. False
21. d
22. f
23. i
24. a
25. h
26. j
27. b
28. c
29. e
30. g
31. n
32. r
33. q
34. m
35. o
36. k
37. l
38. s
39. t
40. p
41. c
42. a
43. d
44. d
45. d
46. b
47. a
48. d
49. c
50. b
51. c
52. a
53. c
54. a
55. a
56. b
57. a
58. e
59. a
60. a