General Instructions
-Follow all of the instructions exactly and answer the questions along the way.
-Perform only the tasks that are indicated.Doing anything more or anything less may cause subsequent answers to be incorrect.
-Submit this lab to the appropriate area on Blackboard when you are done.
-If a question asks you what command you typed, provide the command exactly as you entered it in the terminal window.
-Use the man pages as needed, and/or refer back to the lecture videos as needed.
-Record your answers using a different color font. Upload in a .doc or .docx format.
Section 1 – Basic grep Commands

Log in to your Pi as a regular (non-root and non-admin) user, then open a terminal window and navigate to /usr/share/common-licenses/

Run the following command:grep “GNU” GPL-3

Modify the command in #2 so that it displays the total number of lines containing matches.

How many lines are there?
What command did you enter for this step?

Modify the command in #2 so that it returns the number of matches.(We saw how to do this with pipes in the lecture videos.)

How many matches are there?
What command did you enter for this step?

Modify the command in #4 so that it returns the number of case-insensitive matches (meaning it doesn’t care about capitalization).

How many matches are there?
What command did you enter for this step?

This shows all lines in GPL-3 ending with a capital letter:grep “[A-Z]$” GPL-3
How many such lines are there?
Consider this grep command:grep -v “license” GPL-3

What does the given grep command do?
How many lines in the file are returned by the grep command?(Hint: Modify the given command slightly and run the modified version.)

Run a grep command to display the lines that START with the expression GNU in all capitals.

What command did you enter for this?
How many lines are there?

Run a grep command to display the lines that END with the word license regardless of capitalization.(In other words, your matches should be case insensitive.)

What command did you enter for this?
How many lines are there?

Explain in general what the following regular expression matches:”^[^aeiouy]”
The regular expression “.*” is very useful because it means “match 0 or more non-newline characters”.Remember that the period means “any non-newline character” and the asterisk means “0 or more of the preceding regex”.This allows us to match essentially any string of characters completely contained on one line.
Remember also that we must “escape” using the backslash if we want to match special characters.For example, “.” matches the period character.
Explain in general what the following regular expression matches:”^[A-Z].*.$”

Make sure you are still in /usr/share/common-licenses.Which two words does the following regular expression match?egrep “(copy)?right” GPL-3
Give a different command that’s equivalent to the one in #12.(Hint: think grep with an option)
Give a single grep command to find all lines matching the following description:
Consider the following grep commands:

egrep “[AEIOUaeiou]{3}” GPL-3shows all lines in GPL-3 with 3 consecutive vowels.How many such lines are there?
egrep “[A-Za-z]{16,20}” GPL-3shows all lines in GPL-3 with 16, 17, 18, 19, or 20 consecutive alphabetic characters.How many such lines are there?

One common way to find files is by name.This command searches the /usr directory and all of its subdirectories for files named “pip”:find /usr -name “pip”

Give a find command that can be used to find all files named “cron” inside the /etc directory.(You may need sudo to make it actually work on your Pi but you don’t need to include sudo in your answer.)

We can also use the find command to search for files by size.

This command searches the current directory and all of its subdirectories for files that are exactly 50 bytes:find -size 50c
This command searches /usr and all of its subdirectories for files that are less than 200 kilobytes:find /usr -size -200k
This command searches /etc and all of its subdirectories for files that are more than 15 megabyes:find /etc -size +15M

Give a find command that searches the /lib directory for files that are more than 400 kilobytes.(You don’t need to put sudo in your answer.)

Navigate to your home directory and run this command:find / -name “pip”
You should see a bunch of “permission denied” messages on the screen and possibly some successful results such as /usr/bin/pip.

Give a modified version of the given find command that will redirect the “permission denied” messages into the trash can (remember the trash can is /dev/null).

Give a modified version of the given find command that will both redirect the successful messages to file.txt AND redirect the “permission denied” messages into the trash can.

Section 2 – Extended Regular Expressions
The line begins with a lowercase letter, followed by one or more non-newline characters, followed by either the word “license” in all lowercase or the word “software” in all lowercase, followed by zero or more non-newline characters, and the line must end with anything except for a lowercase letter.
Your output should look like this:
form of a separately written license, or stated as exceptions;
work thus licensed is called the contributor’s “contributor version”.
or that patent license was granted, prior to 28 March 2007.
free software which everyone can redistribute and change under these terms.
Section 3 – Using the find Command
Section 4 – Redirecting Output

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool’s honor code & terms of service.
Get professional assignment help cheaply
Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?
Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.
Our essay writers are graduates with diplomas, bachelor, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.
Why choose our academic writing service?

Plagiarism free papers
Timely delivery
Any deadline
Skilled, Experienced Native English Writers
Subject-relevant academic writer
Adherence to paper instructions
Ability to tackle bulk assignments
Reasonable prices
24/7 Customer Support
Get superb grades consistently

 

Get Professional Assignment Help Cheaply

Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?
Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.
Our essay writers are graduates with diplomas, bachelor’s, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.
Why Choose Our Academic Writing Service?

Plagiarism free papers
Timely delivery
Any deadline
Skilled, Experienced Native English Writers
Subject-relevant academic writer
Adherence to paper instructions
Ability to tackle bulk assignments
Reasonable prices
24/7 Customer Support
Get superb grades consistently

How It Works
1.      Place an order
You fill all the paper instructions in the order form. Make sure you include all the helpful materials so that our academic writers can deliver the perfect paper. It will also help to eliminate unnecessary revisions.
2.      Pay for the order
Proceed to pay for the paper so that it can be assigned to one of our expert academic writers. The paper subject is matched with the writer’s area of specialization.
3.      Track the progress
You communicate with the writer and know about the progress of the paper. The client can ask the writer for drafts of the paper. The client can upload extra material and include additional instructions from the lecturer. Receive a paper.
4.      Download the paper
The paper is sent to your email and uploaded to your personal account. You also get a plagiarism report attached to your paper.

 

PLACE THIS ORDER OR A SIMILAR ORDER WITH Essay fount TODAY AND GET AN AMAZING DISCOUNT

The post Linux essential Lab questions appeared first on Essay fount.


What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but you proved you are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 11***| Rating: ⭐⭐⭐⭐⭐
"This company is the best there is. They saved me so many times, I cannot even keep count. Now I recommend it to all my friends, and none of them have complained about it. The writers here are excellent."


"Order a custom Paper on Similar Assignment at essayfount.com! No Plagiarism! Enjoy 20% Discount!"