0% found this document useful (0 votes)
235 views

Quiz2.Working With Unix

The document contains 10 multiple choice questions that test knowledge of basic Unix/Linux commands and concepts. The questions cover topics such as: the type of interface used to interact with Unix tools (command line), what happens when you press enter at the prompt without entering a command, the output of basic echo commands, the starting directory for shells, the meaning of the pwd command output, what the cd command does, commands for creating directories and files like mkdir and touch, using redirection operators like > and >>, and the actions performed by example commands like mkdir, touch, echo, mv, cp, and rm.

Uploaded by

carlossg01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
235 views

Quiz2.Working With Unix

The document contains 10 multiple choice questions that test knowledge of basic Unix/Linux commands and concepts. The questions cover topics such as: the type of interface used to interact with Unix tools (command line), what happens when you press enter at the prompt without entering a command, the output of basic echo commands, the starting directory for shells, the meaning of the pwd command output, what the cd command does, commands for creating directories and files like mkdir and touch, using redirection operators like > and >>, and the actions performed by example commands like mkdir, touch, echo, mv, cp, and rm.

Uploaded by

carlossg01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 4

1. What kind of interface do you use to interact with Unix tools?

1. A graphical interface.
2. A virtual reality interface.
3. A point-and-click interface.
4. A command line interface.
2. If you type nothing at the prompt and you press Enter, what happens?
1. A new shell will appear.
2. The last command entered will be executed again.
3. No command is executed and you get a new prompt under the old prompt.
4. Your shell will restart.
3. What is printed if you enter the following into the console:
echo 'Hello World!'
1. Hello World!
2. 'Hello World!'
3. echo 'Hello World!'
4. -bash: echo: command not found
4. What directory does your shell start in?
1. The start directory.
2. The working directory.
3. The home directory.
4. The root directory.
5. The path that is printed as the result of the pwd command is…
1. ... the path to the root directory.
2. ... the path to the primary directory.
3. ... the path to the home directory.
4. ... the path to the working directory.
6. The cd command…
1. ... sets a new home directory.
2. ... changes the working directory.
3. ... changes the current disk.
4. ... lists the files in the current directory.
7. Which of the following commands can you use to create a new directory?
1. Clear
2. ls
3. touch
4. mkdir
8. Which of the following commands can you use to create a new file?
1. Mkdir
2. clear
3. touch
4. cd
9. What would the be printed to the console as the result of the following commands?
echo 'Todo list:' > todo.txt
echo '- Email Jeff' >> todo.txt
cat todo.txt
1. Todo list:
- Email Jeff
2. Todo list:
- Email Jeff
3. 2 5 24 todo.txt
4. -rw-r--r-- 1 user staff 24 Jun 30 13:36 todo.txt
10. What actions are performed by the following commands?
mkdir documents
mkdir notes
touch documents/todo.txt
echo 'My to do list:' > documents/todo.txt
touch bio-notes.txt
mv bio-notes.txt notes
cp -r notes documents
rm -rf notes
a)
• Create a directory called documents.
• Create a directory called notes.
• Create a file called todo.txt in documents.
• Add a line of text to todo.txt.
• Create bio-notes.txt.
• Move bio-notes.txt into notes.
• Copy the notes directory into documents.
• Destroy the notes directory
b)
• Create a directory called documents.
• Create a directory called notes.
• Create a file called todo.txt in documents.
• Add a line of text to todo.txt.
• Create bio-notes.txt.
• Move bio-notes.txt into notes.
• Copy the notes directory into documents.
• Destroy the notes directory
c)
• Create a directory called documents.
• Create a directory called notes.C
• reate a directory called todo.txt in documents.
• Create todo.txt with a line of text.
• Create bio-notes.txt.
• Rename bio-notes.txt to notes.
• Copy the notes file into documents.
• Destroy the notes file.
d)
• Create a directory called documents.
• Create a directory called notes.
• Create a directory called todo.txt in documents.
• Create todo.txt with a line of text.
• Create bio-notes.txt.
• Move bio-notes.txt into notes.
• Copy the notes directory into documents.
• Destroy the notes directory.
e)
• Create a directory called documents.
• Create a directory called notes.
• Create a file called todo.txt in documents.
• Add a line of text to todo.txt.
• Create bio-notes.txt.
• Rename bio-notes.txt to notes.
• Copy the notes file into documents.
• Destroy the notes file.

You might also like