CS 2204 Quiz – Week of 9/10/2001

 


1.      Which of the following UNIX commands will not take the user student5 to his personal home directory?

a.       cd

b.      cd /~

c.       cd ~

d.      cd ~student5

Answer: b

 

2.      What is a shell in UNIX?

a.       a program through which users can issue commands to UNIX

b.      a window management system

c.       the login screen

d.      the thing that rides on the back of a turtle in UNIX

Answer: a

 

3.      What is the generic syntax for all UNIX commands?

a.       command name, followed by arguments, followed by options

b.      command name followed by arguments

c.       command name followed by options

d.      command name, followed by options, followed by arguments

Answer: d

 

4.      Which of the following represents an absolute path?

a.       ../home/file.txt

b.      bin/cat

c.       cs2204/

d.      /usr/bin/cat

Answer: d

 

5.      Which of these commands will set the permissions on file textfile to read and write for the owner, read for the group, and nothing for everyone else?

a.       chmod 046 textfile

b.      chmod 640 textfile

c.       chmod 310 textfile

d.      chmod rw r nil textfile

Answer: b

 

6.      Which of the following is not a UNIX file type?

a.       plain file

b.      special file

c.       batch file

d.      directory file

Answer: c

 

7.      When you use the ln command, which of the following occurs?

a.       a file is created that points to an existing file

b.      a file is created that is a copy of an existing file

c.       a file is moved from one location to another

d.      a file is renamed

Answer: a

 

8.      What UNIX command is used to update the modification time of a file?

a.       time

b.      modify

c.       cat

d.      touch

Answer: d

 

9.      Which command will print the contents of all files in the current directory whose names start with the character ‘a’ and end with a period (‘.’) followed by any two characters followed by a number?

a.       ls a*.??[0-9]

b.      ls a*.??#

c.       cat a*.??[0-9]

d.      cat a?.**#

Answer: c

 

10.  The apropos command is used to:

a.       obtain a list of commands whose description contains given keywords

b.      change the system language to French

c.       get help on a particular command

d.      create a new binary file

Answer: a