Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Get started with the Linux command line and the Shell Microsoft Quiz Answers

Get Get started with the Linux command line and the Shell Microsoft Quiz Answers

The command line is something you will interact with often when using Linux, both as a developer and admin. Knowing how it works and what commands you can use can greatly increase your productivity. In this learning path, you will get started with the Linux command line. You will:

  • Navigate the file system
  • Handle processes
  • Search text files
  • Assign file access permissions
  • Script tasks

Prerequisites:

None

Enroll on Microsoft

Module 1: Introduction to Bash

Use Bash to manage IT infrastructure.

Learning objectives:

In this module, you will:

  • Learn what shells are and what Bash is.
  • Learn about the syntax of Bash commands.
  • Learn about important Bash commands, such as ls, cat, and ps.
  • Learn how to use I/O operators to redirect input and output.
  • Learn how to update a server’s operating system.
  • Learn how to find and terminate rogue processes.
  • Learn how to use Bash to filter Azure CLI output.

Prerequisites:

None

This module is part of these learning paths:

Quiz 1: Exercise – Try Bash

Q1. What directory would you switch to if you entered the Bash command cd .?

  • My special “home” directory
  • The parent directory
  • The first alphabetical subdirectory
  • I wouldn’t switch directories

Quiz 2: Knowledge check

Q1. Which of the following commands writes a list of processes associated with a user named scottgu to a file?

  • cat | grep scottgu > processes.txt
  • cat > grep scottgu | processes.txt
  • ps -ef | grep scottgu > processes.txt

Q2. Which of the following commands, called with the -r option, would you use to delete a subdirectory that isn’t empty?

  • rm
  • rmdir
  • nuke

Q3. Which of the following commands combines the contents of foo.txt and bar.txt into a new file named foobar.txt?

  • concat foo.txt bar.txt > foobar.txt
  • cat foo.txt bar.txt | foobar.txt
  • cat foo.txt bar.txt > foobar.txt

Q4. The purpose of the sudo command is to:

  • Run a command with elevated privilege
  • Run a program and leave it running in the background
  • Prevent system files from being deleted by non-administrative users

Q5. Which of the following statements is true about the command python3 app.py &?

  • It runs app.py after creating a restore point in the system
  • It runs app.py and returns immediately to the command prompt
  • It runs app.py, but only if it’s located in the /etc directory

Module 2: Use the UNIX shell to wrangle log data

Learn how to use the UNIX shell to wrangle data and inspect data files.

Learning objectives:

In this module, you’ll learn how to:

  • Do basic file inspection with commands such as headtailwcless, and sort.
  • Use the cat command to create, append, display, and concatenate files.
  • Write and use regex (regular expressions) for text pattern matching.
  • Use the grep command to search files, or stdin content for pattern matching along with regex.
  • Do basic text transformations on input streams by using sed and regex.
  • Use pipes and filters for data wrangling.

Prerequisites:

  • Basic knowledge of the command line and basic shell commands

This module is part of these learning paths:

Quiz 1: Knowledge check

Q1. In our current directory, we want to find the three files with the least number of lines. Which command would work?

  • wc -l * > sort -n > head -n 3
  • wc -l * | sort -n | head -n 1-3
  • wc -l * | sort -n | head -n 3
  • wc -l * | head -n 3 | sort -n

Q2. What will the regular expression Fr[ea]nc[eh] match?

  • French, France, Frence, Franch
  • Frenche, Franceh, Frenceh, Franche
  • France, French
  • Freanceh, Fraenche

Q3. The -v option to the grep command inverts pattern matching so that only lines that don’t match the pattern are printed. Which of the following commands will find all files in the /data directory whose names end in s.txt, but whose names also don’t contain the string net? Examples are shuttles.txt or software.txt, but not planets.txt.

  • find data -name *s.txt | grep -v net
  • grep -v 'net' $(find data -name '*s.txt')
  • find data -name '*s.txt' | grep -v net
  • None of the above

Q4. Suppose you want to delete some processed data files and only keep your raw files and processing script to save storage. The raw files end in .dat, and the processed files end in .txt. Which of the following solutions would remove all of the processed data files, and no other files?

  • rm ?.txt
  • rm *.txt
  • rm * .txt
  • rm *.*
Conclusion:

I hope this Get started with the Linux command line and the Shell Microsoft Quiz Answers would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.

This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.

Keep Learning!

More Coding Solutions >>

LeetCode Solutions

Hacker Rank Solutions

CodeChef Solutions

Leave a Reply

Your email address will not be published. Required fields are marked *