Lab05.docx
pdf
keyboard_arrow_up
School
Langara College *
*We aren’t endorsed by this school
Course
1280
Subject
Statistics
Date
Apr 3, 2024
Type
Pages
3
Uploaded by raman16894
–Lab 05 – The UNIX File System (cont)
Objective
●
To figure out the commands on the UNIX terminal to complete the steps listed under
The Task
.
Resources Needed
●
PC with Ubuntu 20.04 LTS or higher installed, OR
●
Ubuntu 20.04 LTS or higher installed in a VirtualBox or VMware virtual machine, OR
●
A running instance of Ubuntu 20.04 LTS or higher on AWS
About the Lab
The purpose of this lab is for you to try some commands and observe their output and the command
feedback (warning/error messages and so on) on the screen.
The Task
In this terminal session, you will practice the commands discussed in the lecture by creating directories
and then manipulating files in the directories.
1.
Open a new terminal and clear your command history using the command
history -c
.
2.
Create a directory called
memos
in your HOME directory.
●
mkdir memos
3.
Create four directories named
dir1
,
dir2
,
dir3
, and
dir4
in your HOME directory using a
single command.
●
mkdir dir1 dir2 dir3 dir4
4.
Download the files
file-content.txt
and
file-content-add.txt
from under
Lab 5
in Brightspace to your HOME directory.
5.
Use
touch
to create the empty files
1memo
,
2memo
,
stat
,
stat1
,
stat12
, and
stat593
in a single command line in your HOME directory.
●
touch 1memo 2memo stat stat12 stat593
6.
Using the
cat
command, create a file called
myfile
in your HOME directory and add the text
in
file-content.txt
to this file.
●
cat file-content.txt > myfile
7.
Display the contents of
myfile
on the terminal screen. Which CHAPTER(S) do you see in
myfile
?
●
vi myfile
●
CHAPTER I
8.
Using the
cat
command, append the text in
file-content-add.txt
to
myfile
.
●
cat file-content-add.txt >> myfile
9.
Display the contents of
myfile
on the terminal screen. Which CHAPTER(S) do you see in
myfile
now?
●
vi myfile
●
CHAPTER I and CHAPTER II
10. Using the
cat
command, append the following line to
myfile
. Which key did you use to signal
the end of the input to
cat
?
THIS IS THE END OF MY TEXT.
●
cat >> myfile
Page 1 of 3
●
^ + D (ctrl + D in windows)
11. Copy
myfile
in your HOME directory to another file named
large
.
●
cp myfile large
12. Create another name for the file
large
.
●
ln large LRG
13. Using the name
LRG
, list two ways to open the file
large
in read-only mode using the
vi
editor.
●
view LRG
●
vi -R LRG
14. List two ways of displaying the number of lines in the
large
file on the terminal.
●
cat -n large
●
wc large
What is the total number of lines?
●
467
15. Copy all files in your HOME directory to the
memos
directory.
●
cp * memos
(had to make a dir lab_home to avoid copying large
amounts of data in HOME to memos)
16. List the contents of the
memos
directory.
●
ls memos
You would see that only the files from your HOME directory were copied to memos and not the
directories. You would also have received a warning regarding this in step 15 when you tried to
copy all files.
17. Now, while staying in your HOME directory, delete all files you just copied into
memos
.
●
rm memos/*
18. Copy all files and directories in your HOME directory to the
memos
directory.
●
cp -r * memos
19. Change to the memos directory.
●
cd memos
20. Now go ahead and delete only the directories from the
memos
directory. (This step may require
some creativity).
●
rm -r */
21. List the contents of the
memos
directory. You should see only the files you copied here.
●
ls
22. Change the name of
large
to
large.old
.
●
mv large large.old
23. While staying in the
memos
directory, use relative path to move
large.old
to your HOME
directory.
●
mv large.old ../../
24. Change to your HOME directory.
●
cd
25. List all files whose filenames start with the letter
l
.
●
ls l*
Which files do you see?
●
large large.old
●
since I named the proxy folder lab_home, its contents also
show up:
Page 2 of 3
PASTE HERE A SCREENSHOT SIMILAR TO THE ONE BELOW. THE SCREENSHOT MUST
SHOW YOUR LOGIN NAME AT THE TOP WITH THE COMMAND HISTORY BELOW IT.
Submission: What to hand in
Upload the edited document
Lab05.docx
(which includes all your answers and the final
screenshot) to Brightspace.
Submission: When to hand in
Before midnight (11:59 PM) today.
Page 3 of 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Documents
Related Questions
The data file includes the text of three books of the Bible (Joshua, Jonah and Philippians) using the ESV translation. While these are all great books, our only interest for this project is how often each letter is used.
Identify those letters whose Cls do not overlap with any the CIs of any of the other letters. (For example the CI [0.042, 0.052] overlaps with [0.050, 0.060] because the upper bound of the first CI is greater than the lower bound of the second CI.) List the letters with the non-overlapping Cis and specify how many such letters there are.
arrow_forward
Assume that cells A1, A2, A3, and A4 of an Excel spreadsheet contain valid numbers. If you type “=SUM(A1:A4)” into a cell B1 of the Excel spreadsheet, what happens?
which below s correct?
Excel performs the following calculation: A1 + A2 + A3 + A4
Excel performs the following calculation: A1 + A4
Nothing – this is not a valid Excel function
Excel returns an error message
arrow_forward
Find the symmetric difference of the set of computer science majors at a school and the set of mathematics majors at this school.
arrow_forward
A company that sells its product on their website would like to improve the sales by making the webpage with product info more attractive. Current version (call
it version A) and a new version (call it version B) are compared. A JavaScript code randomly chooses one of the two versions of the website to load to each
customer that clicks on the link to the page about the product.
Each version of the page has Buy button that leads the customer to purchase the product online. The company would like to test whether the new version
(B) is better than the old one (A) by comparing the true probabilities pA and PB of purchasing the product for a randomly chosen visit of each website.
Let Pд be probability that a randomly chosen visitor of website version A buys the product from the website. Similarly, let pg be the corresponding probability
for version B. Let n₁ and n₂ be sample sizes of the visitors of versions A and B, respectively. Also, denote by X1 and X2 the numbers of visitors in the two…
arrow_forward
still having a hard time figuring out how to insert it into the calculator
arrow_forward
Suppose the Texas Department of Motor Vehicles is tracking the number of car, truck and motorcycle
(respectively) crashes in Texas over the years 2000 to 2019 in an array TXCrash (3 x 20).
Which of the following defines a MATLAB variable that contains the total number of crashes for the years
2000 to 2009 (all vehicles)?
O TotalCrashForFirstDecade = sum(TXCrash([1:10], all))
O TotalCrashFor FirstDecade = sum(TXCrash(:, [1:10]))
O TotalCrashForFirstDecade = sum(TXCrash (2000-2009, :))
TotalCrashForFirstDecade = sum(TXCrash([1:10], :))
arrow_forward
Need help with this.
arrow_forward
The data file includes the text of three books of the Bible (Joshua, Jonah and Philippians) using the ESV translation. While these are all great books, our only interest for this project is how often each letter is used.
3) Identify those letters whose Cls do not overlap with any the CIs of any of the other letters. (For example the CI [0.042, 0.052] overlaps with [0.050, 0.060] because the upper bound of the first CI is greater than the lower bound of the second CI.) List the letters with the non-overlapping Cis and specify how many such letters there are
Question 3 answers:
Letters
Lower bound
Upper bound
L
0.037072109
0.042042
D
0.043728076
0.049092
E
0.11621383
0.12451
4) The previous analysis could be useful if our goal was to decipher an encrypted message, where each letter is scrambled (for example, each “a” might become a “g”, while each “b” might become an “o” and so forth).
a) Assume that the letter “z” in encrypted message has a relative frequency of 0.06…
arrow_forward
Structure.com/courses/39109/pages/week-number-16-project-number-2 sect-2-dol-7 wed-dot-opens-12-slash-4-slash-2024-and-closes-thurs-dot-12-slas... +✰
+
+
This graded project assignment will be posted as "ALEKS External Assignment: PROJECT #2:
ONLY 1-Page in pdf format must be submitted (uploaded in CANVAS-Inbox Message with ALL work and answers.
If the uploaded Project Assignment can NOT BE OPENED by the instructor, a zero-grade will be posted in the ALEKS gradebook. NO EXCEPTIONS!
Include your name & your section for this course.
If no submission is made by the due date: Thursday, 12/5/2024 at 11:59 pm (EST), a zero-score will be recorded in ALEKS. NO Make-up! No EXCEPT
To be successful with PROJECT#2 assignment do the following:
a. Go to ALEKS Home page by clicking ALEKS in the CANVAS-Modules menu and follow steps below:
b. Make sure you REVIEW STUDY material for Chapter 2 (Section: 2.7) in the ALEKS e-Textbook. Be sure to understand Example 2 and ALSO watch Lectu
(video); Solving a…
arrow_forward
is there a place to put this in the calculator
arrow_forward
Suppose a company needs temporary passwords for the trial of a new time management software. Each password will have two letters followed by two digits. The digits 7 8 and 9 will not be used. So there are 26 letters and seven digits that will be used. Assume the letters and digits can be repeated. How many passwords can be created using this format?
Passwords =
arrow_forward
BA is comprised of three categories of analytics.
Write a summary for each category and include at least two techniques for each of the three categories of analytics.
arrow_forward
Please write out the different types of models for the base ten system
arrow_forward
The difference between the largest and smallest values in an ordered array is called the interquartile range.
Select one:
True
False
arrow_forward
The Gotham City Police Department employs 30police officers. Each officer works 5 days per week. Thecrime rate fluctuates with the day of the week, so the numberof police officers required each day depends on which dayof the week it is: Saturday, 28; Sunday, 18; Monday, 18;Tuesday, 24; Wednesday, 25; Thursday, 16; Friday, 21. Thepolice department wants to schedule police officers tominimize the number whose days off are not consecutive.Formulate an LP that will accomplish this goal. (Hint: Havea constraint for each day of the week that ensures that theproper number of officers are not working on the given day.)
arrow_forward
When MapReduce is executed, data are first divided
up into manageable subsets and distributed to
different computers for storing and processing.
Then, the answers from each of those computers
are combined into one answer. Notice that the first
sentence clarifies that processing (and storing) is
done by "different computers." The second sentence
mentions these different computers again, this time
referring to them as "those computers". What term
is often used to refer to each one of those different
individual computers? (hint: The general term is
often followed by a number as a means of
identifying specific computers in the programming
model.)
Cluster
Processor
O Client
O Node
arrow_forward
Please fill out the entries in the following table by explaining/drawing how each operation can be represented by the indicated
models.
arrow_forward
COVID-19 (novel corona virus) took the world by surprise in late 2019. By early 2020, nearly all countries worldwide were affected.Early reports from the US Centers for Disease Control and Prevention (CDC) estimated that approximately 3% of infected patients in the United States between the ages of 55 and 64 had died. This figure is known as the mortality rate of the virus for this age group. Suppose a sample of 1120 infected patients in the United States between the ages of 55 and 64 were randomly selected and 34 of the patients were known to have died. Use the p-value method to determine if the sample data support the conclusion that the mortality rate of patients between the ages of 55 and 64 is greater than 3%. Let α=0.01State the null and alternative hypothesis for this test.
H0=
H1=
Determine the test statistic for the hypothesis test. Round the solution to two decimal places. =
Determine the p-value for the hypothesis test. Round the solution to four decimal places. =
Determine…
arrow_forward
Can someone walk me through how to find this using excel? I am studying for my final and I am so confused for finding the second part
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage

Elementary Geometry for College Students
Geometry
ISBN:9781285195698
Author:Daniel C. Alexander, Geralyn M. Koeberlein
Publisher:Cengage Learning

Mathematics For Machine Technology
Advanced Math
ISBN:9781337798310
Author:Peterson, John.
Publisher:Cengage Learning,

Linear Algebra: A Modern Introduction
Algebra
ISBN:9781285463247
Author:David Poole
Publisher:Cengage Learning
Related Questions
- The data file includes the text of three books of the Bible (Joshua, Jonah and Philippians) using the ESV translation. While these are all great books, our only interest for this project is how often each letter is used. Identify those letters whose Cls do not overlap with any the CIs of any of the other letters. (For example the CI [0.042, 0.052] overlaps with [0.050, 0.060] because the upper bound of the first CI is greater than the lower bound of the second CI.) List the letters with the non-overlapping Cis and specify how many such letters there are.arrow_forwardAssume that cells A1, A2, A3, and A4 of an Excel spreadsheet contain valid numbers. If you type “=SUM(A1:A4)” into a cell B1 of the Excel spreadsheet, what happens? which below s correct? Excel performs the following calculation: A1 + A2 + A3 + A4 Excel performs the following calculation: A1 + A4 Nothing – this is not a valid Excel function Excel returns an error messagearrow_forwardFind the symmetric difference of the set of computer science majors at a school and the set of mathematics majors at this school.arrow_forward
- A company that sells its product on their website would like to improve the sales by making the webpage with product info more attractive. Current version (call it version A) and a new version (call it version B) are compared. A JavaScript code randomly chooses one of the two versions of the website to load to each customer that clicks on the link to the page about the product. Each version of the page has Buy button that leads the customer to purchase the product online. The company would like to test whether the new version (B) is better than the old one (A) by comparing the true probabilities pA and PB of purchasing the product for a randomly chosen visit of each website. Let Pд be probability that a randomly chosen visitor of website version A buys the product from the website. Similarly, let pg be the corresponding probability for version B. Let n₁ and n₂ be sample sizes of the visitors of versions A and B, respectively. Also, denote by X1 and X2 the numbers of visitors in the two…arrow_forwardstill having a hard time figuring out how to insert it into the calculatorarrow_forwardSuppose the Texas Department of Motor Vehicles is tracking the number of car, truck and motorcycle (respectively) crashes in Texas over the years 2000 to 2019 in an array TXCrash (3 x 20). Which of the following defines a MATLAB variable that contains the total number of crashes for the years 2000 to 2009 (all vehicles)? O TotalCrashForFirstDecade = sum(TXCrash([1:10], all)) O TotalCrashFor FirstDecade = sum(TXCrash(:, [1:10])) O TotalCrashForFirstDecade = sum(TXCrash (2000-2009, :)) TotalCrashForFirstDecade = sum(TXCrash([1:10], :))arrow_forward
- Need help with this.arrow_forwardThe data file includes the text of three books of the Bible (Joshua, Jonah and Philippians) using the ESV translation. While these are all great books, our only interest for this project is how often each letter is used. 3) Identify those letters whose Cls do not overlap with any the CIs of any of the other letters. (For example the CI [0.042, 0.052] overlaps with [0.050, 0.060] because the upper bound of the first CI is greater than the lower bound of the second CI.) List the letters with the non-overlapping Cis and specify how many such letters there are Question 3 answers: Letters Lower bound Upper bound L 0.037072109 0.042042 D 0.043728076 0.049092 E 0.11621383 0.12451 4) The previous analysis could be useful if our goal was to decipher an encrypted message, where each letter is scrambled (for example, each “a” might become a “g”, while each “b” might become an “o” and so forth). a) Assume that the letter “z” in encrypted message has a relative frequency of 0.06…arrow_forwardStructure.com/courses/39109/pages/week-number-16-project-number-2 sect-2-dol-7 wed-dot-opens-12-slash-4-slash-2024-and-closes-thurs-dot-12-slas... +✰ + + This graded project assignment will be posted as "ALEKS External Assignment: PROJECT #2: ONLY 1-Page in pdf format must be submitted (uploaded in CANVAS-Inbox Message with ALL work and answers. If the uploaded Project Assignment can NOT BE OPENED by the instructor, a zero-grade will be posted in the ALEKS gradebook. NO EXCEPTIONS! Include your name & your section for this course. If no submission is made by the due date: Thursday, 12/5/2024 at 11:59 pm (EST), a zero-score will be recorded in ALEKS. NO Make-up! No EXCEPT To be successful with PROJECT#2 assignment do the following: a. Go to ALEKS Home page by clicking ALEKS in the CANVAS-Modules menu and follow steps below: b. Make sure you REVIEW STUDY material for Chapter 2 (Section: 2.7) in the ALEKS e-Textbook. Be sure to understand Example 2 and ALSO watch Lectu (video); Solving a…arrow_forward
- is there a place to put this in the calculatorarrow_forwardSuppose a company needs temporary passwords for the trial of a new time management software. Each password will have two letters followed by two digits. The digits 7 8 and 9 will not be used. So there are 26 letters and seven digits that will be used. Assume the letters and digits can be repeated. How many passwords can be created using this format? Passwords =arrow_forwardBA is comprised of three categories of analytics. Write a summary for each category and include at least two techniques for each of the three categories of analytics.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Algebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:CengageElementary Geometry for College StudentsGeometryISBN:9781285195698Author:Daniel C. Alexander, Geralyn M. KoeberleinPublisher:Cengage LearningMathematics For Machine TechnologyAdvanced MathISBN:9781337798310Author:Peterson, John.Publisher:Cengage Learning,
- Linear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage

Elementary Geometry for College Students
Geometry
ISBN:9781285195698
Author:Daniel C. Alexander, Geralyn M. Koeberlein
Publisher:Cengage Learning

Mathematics For Machine Technology
Advanced Math
ISBN:9781337798310
Author:Peterson, John.
Publisher:Cengage Learning,

Linear Algebra: A Modern Introduction
Algebra
ISBN:9781285463247
Author:David Poole
Publisher:Cengage Learning