click below
click below
Normal Size Small Size show me how
7OSYS 23-24 FINALS
REVIEWER MODULE 9-12
| Question | Answer |
|---|---|
| What method combines multiple files into one which eliminates the overhead in individual files and makes it easier to transmit? | The method is called archiving. The tar command is commonly used for this purpose in Linux |
| What command do we use if we want to decompress a .gz file? | The command to decompress a .gz file is gzip command |
| What complete command should I write if I want to archive the Documents directory into Documents.tar? | The command is tar -cvf Documents.tar Documents |
| What option of tar do we use if we want to view the contents of the archived file? | The option is -t. The complete command is tar -tvf archive.tar |
| What method reduces the amount of data needed to store or transmit a file while storing it in such a way that the file can be restored? | compression |
| What are the 2 pager commands that allow users to move around a document using keystroke commands? | The two pager commands are more and less |
| What complete command should I write if I want to view the first 5 lines in words.txt? | The command is "head -n 5 words.txt." |
| In STDOUT to overwrite the contents of a file we use a single arrow “>”. In STDERR instead of “>” what do we need to write to log the error to a text file? | To log the error to a text file, use 2>. |
| What command can be used to rearrange the lines of files or input in either dictionary or numeric order? | The command is sort. |
| In “wc” command what does the “-w” option count? | The -w option counts the number of words. |
| What command can be used to filter lines in a file or the output of another command that matches a specified pattern? | The command is grep. |
| What complete command do we need to use if we want to view lines/words ending with “er” in words.txt? | The command is grep "er$" words.txt. |
| In scripts what do we call the prefix that marks following text as executable? | The prefix is called a shebang (#!). |
| To run scripts in Linux what command do we need to use? | The command is bash scriptname or ./scriptname (if the script is executable). |
| This allows code to be executed repeatedly. | loop. |
| What does the acronym “CPU” stand for? | CPU stands for Central Processing Unit. |
| What command can display memory utilization? | The command is free. |
| Create a script that will create an empty file named “finals_quiz1.txt” and display “Finals Quiz 1 Done” after it creates the empty file. | code: #!/bin/bash touch finals_quiz1.txt echo "Finals Quiz 1 Done" This script creates an empty file named finals_quiz1.txt and then displays the message "Finals Quiz 1 Done". |