CS 3377 Exam 1 Review Questions With
Correct Answers
cd - CORRECT ANSWER✔✔-change to another directory
| | | | | |
mkdir - CORRECT ANSWER✔✔-make a directory
| | | | |
cp - CORRECT ANSWER✔✔-copy a file
| | | | |
pwd - CORRECT ANSWER✔✔-display current working directory
| | | | | |
mv - CORRECT ANSWER✔✔-move a file to another location
| | | | | | | |
rm - CORRECT ANSWER✔✔-
| | |
rmdir - CORRECT ANSWER✔✔-delete a directory
| | | | |
ls - CORRECT ANSWER✔✔-list filenames and directories
| | | | | |
chmod - CORRECT ANSWER✔✔-change file security setting
| | | | | |
,man - CORRECT ANSWER✔✔-help manual
| | | |
Count the files that you own in all your directories (where your userid is
| | | | | | | | | | | | | |
myusername) - CORRECT ANSWER✔✔-ls -lR | grep myusername | wc -l | | | | | | | | | |
What UNIX command is used to update the modification time of a file
| | | | | | | | | | | | |
and/or change the file's access? - CORRECT ANSWER✔✔-touch
| | | | | | |
The file "mypage.html" has permissions set for read and write only for
| | | | | | | | | | | |
owner. Which of the following command will change the permissions so
| | | | | | | | | | |
that the file can be viewed on the WWW? - CORRECT ANSWER✔✔-
| | | | | | | | | | |
chmod og+r mypage.html | |
To list the permissions on files, which of the following commands will
| | | | | | | | | | | |
work? - CORRECT ANSWER✔✔-ls -l
| | | |
When you use the ln command, which of the following occurs? -
| | | | | | | | | | | |
CORRECT ANSWER✔✔-a file is created that points to an existing file
| | | | | | | | | |
(T/F) The command "grep -i hello" prints all the lines in file, not
| | | | | | | | | | | | |
containing the string "hello". - CORRECT ANSWER✔✔-false
| | | | | |
,Which expression shows the proper way to add the directory /usr/bin to
| | | | | | | | | | |
your path? - CORRECT ANSWER✔✔-PATH=$PATH:/usr/bin
| | | | |
Which of the following is not a UNIX file type?
| | | | | | | | |
plain file
|
special file |
batch file |
directory file - CORRECT ANSWER✔✔-batch file
| | | | |
How do you create a new directory called "flower"? - CORRECT
| | | | | | | | | | |
ANSWER✔✔-mkdir flower |
Which of these is not a common UNIX shell discussed in class (or
| | | | | | | | | | | | |
textbook or lecture)? | |
bash
sh
fresh
ksh - CORRECT ANSWER✔✔-fresh
| | |
, What is the command to search all files in your current directory for the
| | | | | | | | | | | | | |
word "hello"? - CORRECT ANSWER✔✔-grep hello *
| | | | | |
Which of the following is not a benefit of the fact that many UNIX
| | | | | | | | | | | | | |
commands operate on plain ASCII text files?
| | | | | |
the same file can be used by many programs
| | | | | | | |
output to the terminal and to files can be done in the same way
| | | | | | | | | | | | |
most current UNIX installations have a graphical user interface
| | | | | | | |
these commands can be used as filters for the output of other
| | | | | | | | | | | |
commands - CORRECT ANSWER✔✔-most current UNIX installations
| | | | | | |
have a graphical user interface
| | | |
Change the current directory to /usr/local/bin - CORRECT ANSWER✔✔-
| | | | | | | |
cd /usr/local/bin
|
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? -
| | | | | | | | | | | |
CORRECT ANSWER✔✔-cat a*.??[0-9] | |
Correct Answers
cd - CORRECT ANSWER✔✔-change to another directory
| | | | | |
mkdir - CORRECT ANSWER✔✔-make a directory
| | | | |
cp - CORRECT ANSWER✔✔-copy a file
| | | | |
pwd - CORRECT ANSWER✔✔-display current working directory
| | | | | |
mv - CORRECT ANSWER✔✔-move a file to another location
| | | | | | | |
rm - CORRECT ANSWER✔✔-
| | |
rmdir - CORRECT ANSWER✔✔-delete a directory
| | | | |
ls - CORRECT ANSWER✔✔-list filenames and directories
| | | | | |
chmod - CORRECT ANSWER✔✔-change file security setting
| | | | | |
,man - CORRECT ANSWER✔✔-help manual
| | | |
Count the files that you own in all your directories (where your userid is
| | | | | | | | | | | | | |
myusername) - CORRECT ANSWER✔✔-ls -lR | grep myusername | wc -l | | | | | | | | | |
What UNIX command is used to update the modification time of a file
| | | | | | | | | | | | |
and/or change the file's access? - CORRECT ANSWER✔✔-touch
| | | | | | |
The file "mypage.html" has permissions set for read and write only for
| | | | | | | | | | | |
owner. Which of the following command will change the permissions so
| | | | | | | | | | |
that the file can be viewed on the WWW? - CORRECT ANSWER✔✔-
| | | | | | | | | | |
chmod og+r mypage.html | |
To list the permissions on files, which of the following commands will
| | | | | | | | | | | |
work? - CORRECT ANSWER✔✔-ls -l
| | | |
When you use the ln command, which of the following occurs? -
| | | | | | | | | | | |
CORRECT ANSWER✔✔-a file is created that points to an existing file
| | | | | | | | | |
(T/F) The command "grep -i hello" prints all the lines in file, not
| | | | | | | | | | | | |
containing the string "hello". - CORRECT ANSWER✔✔-false
| | | | | |
,Which expression shows the proper way to add the directory /usr/bin to
| | | | | | | | | | |
your path? - CORRECT ANSWER✔✔-PATH=$PATH:/usr/bin
| | | | |
Which of the following is not a UNIX file type?
| | | | | | | | |
plain file
|
special file |
batch file |
directory file - CORRECT ANSWER✔✔-batch file
| | | | |
How do you create a new directory called "flower"? - CORRECT
| | | | | | | | | | |
ANSWER✔✔-mkdir flower |
Which of these is not a common UNIX shell discussed in class (or
| | | | | | | | | | | | |
textbook or lecture)? | |
bash
sh
fresh
ksh - CORRECT ANSWER✔✔-fresh
| | |
, What is the command to search all files in your current directory for the
| | | | | | | | | | | | | |
word "hello"? - CORRECT ANSWER✔✔-grep hello *
| | | | | |
Which of the following is not a benefit of the fact that many UNIX
| | | | | | | | | | | | | |
commands operate on plain ASCII text files?
| | | | | |
the same file can be used by many programs
| | | | | | | |
output to the terminal and to files can be done in the same way
| | | | | | | | | | | | |
most current UNIX installations have a graphical user interface
| | | | | | | |
these commands can be used as filters for the output of other
| | | | | | | | | | | |
commands - CORRECT ANSWER✔✔-most current UNIX installations
| | | | | | |
have a graphical user interface
| | | |
Change the current directory to /usr/local/bin - CORRECT ANSWER✔✔-
| | | | | | | |
cd /usr/local/bin
|
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? -
| | | | | | | | | | | |
CORRECT ANSWER✔✔-cat a*.??[0-9] | |