Lab 3 Quiz

Lab 3 Quiz

University

12 Qs

quiz-placeholder

Similar activities

Kuis 1 - Manajemen Pemasaran 1

Kuis 1 - Manajemen Pemasaran 1

University

10 Qs

Ideapad flex 5

Ideapad flex 5

12th Grade - Professional Development

10 Qs

Engaging Students in Learning

Engaging Students in Learning

10th Grade - University

10 Qs

Menuju Achivement PS 100% 2021

Menuju Achivement PS 100% 2021

1st Grade - Professional Development

13 Qs

Revit Quiz 3

Revit Quiz 3

University

15 Qs

Advertising

Advertising

University - Professional Development

11 Qs

What I saw in the war

What I saw in the war

University

15 Qs

LessonPlanning

LessonPlanning

University

8 Qs

Lab 3 Quiz

Lab 3 Quiz

Assessment

Quiz

Professional Development

University

Medium

Created by

Priyanka S Shivaramaiah

Used 8+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the command ls > capture.txt do?

Lists files on the terminal

Saves the list of files in capture.txt

Displays an error message in capture.txt

Combines output with stderr

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the command ./error.sh 1> capture.txt 2> error.txt, what is the purpose of 1>?

Redirects both stdout and stderr

Redirects standard output to capture.txt

Displays output in the terminal

Ignores standard output

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of running ./error.sh > /dev/null 2> /dev/null?

Only stdout is shown on the terminal

Both stdout and stderr are discarded

Only stderr is redirected to the terminal

The script fails silently

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you redirect the output of ls to a file named capture.txt?

ls >> capture.txt

ls = capture.txt

ls > capture.txt

ls | capture.txt

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does chmod +x error.sh do?

Changes file ownership

Adds read permissions

Makes the file executable

Deletes the file

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when you run ./error.sh > capture.txt?

The script runs without output

The output goes to capture.txt

The script fails to run

The terminal shows an error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of 2> in the command ./error.sh 2> capture.txt?

Redirects stdout

Redirects stderr

Displays output on the screen

None of the above

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?