What is the proper command to use to compress the file filename.txt into the zip archive called myfile.zip?

Power of Command Line Pt1

Flashcard
•
Instructional Technology
•
Professional Development
•
Hard
Quizizz Content
FREE Resource
Student preview

28 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
zip myfile.zip filename.txt
Answer explanation
The syntax for zipping a file into a zip archive is "zip myfile.zip filename.txt".
2.
FLASHCARD QUESTION
Front
What statement is used to get input from the terminal when a shell script is being run?
Back
read
Answer explanation
The read command is used to get input from the terminal when using a shell script.
3.
FLASHCARD QUESTION
Front
Consider the following script:
#!/bin/bash
ip=`route -n | grep UG | tr -s “ “ | cut -f 2 -d “ “`
echo “Checking to see if $ip is up..."
ping -c 5 $ip
What does the script output?
Back
Checking to see if ipaddress is up...
Answer explanation
The line in the script that starts with the echo command will cause the string, "Checking to see if $ip is up…" will be executed. When this is executed, the value of $ip will be replaced with the result of the command in the second line (which contains route).
4.
FLASHCARD QUESTION
Front
Which option can be used with tail to print the last 10 lines of a file and then keep printing any new lines that may be added continuously? Options: -n, -f, -x, -a
Back
-f
Answer explanation
The -f option is used to "follow" the contents of the file. This lets tail print the last 10 lines of a file (usually a log file) and continue to print out new lines to the screen as they are added to the file.
5.
FLASHCARD QUESTION
Front
Which command is used to make a shell variable known to subsequently executed programs?
Back
export
Answer explanation
The command export is used to make a shell variable known to subsequently executed programs. Essentially, the export command creates a globally accessible variable when it is run.
6.
FLASHCARD QUESTION
Front
What option can be used with cat to display line numbers with the text of a file to the screen? Options: #, -x, -n, -1
Back
-n
Answer explanation
The -n option will show the line numbers next to a file's contents when displayed to the screen. For example, "cat -n song.txt" will display the contents of the song.txt file with line numbers down the left column of the display.
7.
FLASHCARD QUESTION
Front
What is one of the most basic features of a shell script? Options: The ability to compile programs, The ability to run commands, The ability to ask for user input, The ability to display command output information
Back
The ability to run commands
Answer explanation
A shell script is a computer program designed to be run by the shell. Typical operations performed by shell scripts include file manipulation and command execution. The most basic scripts run commands in serial order and do not provide any output back to the screen or seek input from a user.
Create a free account and access millions of resources
Similar Resources on Quizizz
25 questions
KK-ELEMEN 5 ASJTJKT

Flashcard
•
KG - University
20 questions
March Madness

Flashcard
•
KG - Professional Dev...
20 questions
Canada Part 2 Flashcard

Flashcard
•
KG - University
21 questions
Mandatos formales

Flashcard
•
KG - University
20 questions
DBMS Introduction Flashcard 1

Flashcard
•
University
20 questions
DBMS Introduction Flashcard 1

Flashcard
•
University
20 questions
CompTIA ITF+

Flashcard
•
Professional Development
20 questions
CompTIA ITF+

Flashcard
•
Professional Development
Popular Resources on Quizizz
10 questions
Chains by Laurie Halse Anderson Chapters 1-3 Quiz

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
15 questions
Character Analysis

Quiz
•
4th Grade
12 questions
Multiplying Fractions

Quiz
•
6th Grade
30 questions
Biology Regents Review #1

Quiz
•
9th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade