Write My Paper Button

WhatsApp Widget

Labs for A Practical Guide to Linux

$20 Bonus + 25% OFF

Securing Higher Grades Costing Your Pocket?
Book Your Assignment at The Lowest Price
Now!

Students Who Viewed This Also Studied

ULI101 Introduction to UNIX/Linux and the Internet

Question:

Article: Labs for A Practical Guide to Linux Commands, Editors, and Shell Programming by Mark G. Sobell

Introducing a Few Utilities

Learning Objectives and Outcomes

In this lab you will learn how to create a simple file using very basic vim editor com-mands and you will also learn how to use a few common utilities. The utilities will be used in their simplest form. Most of the utilities have many options and can be used in many ways. Use the – –help option, or refer to the Command Reference sec-tion of Sobell or to the man page for a utility to learn more about it.

Procedure

Most of the utilities this lab introduces work with files. Before you can use these util-ities, you must have a file to work with. The first step in this lab explains the basics of how to use the vim editor to create a file.“Chapter 6, Lab 1: Introduction to the vim Editor” on page 22 of this manual explains how to use vim to edit and correct mistakes in files.

  1. The following instructions show how to create a short file. You can correct a mistake on the line you are entering by using the correction keys explained in the previous lab. If you notice a mistake on a previous line, leave it as it is; you will learn how to correct these kinds of mistakes in a later lab.
  2. Give the following command to open thevim editor so it is editing the file named practice.
  • vim practice

The screen will look like Figure 6-1 on page 166 of Sobell.

If bash displays a command not found error, give the preceding command again, replacing vim with vi or vim.tiny.

  1. Before you can insert text into the file you are creating, you must putviminto Input mode. Type the letter i (for Input mode) to put vim into Input mode.
  2. Withvim in Input mode, type a couple of short lines, ending each line with a RETURN. Make sure to end the last line with a RETURN.
  3. Before you can give a command to exit fromvim, you must put vim into Command mode. Press ESCAPE to put vim into Command mode.
  1. Withvim in Command mode, give the command ZZ (type an uppercase Z twice) to write the new file to disk and exit from vim.
  1. In its simplest form, thels utility (Sobell, page 52) lists the names of files in the working directory (Sobell, page 87). After creating a file as explained in step 1, ls will list the name of that file. Use ls to list the names of the files in the working directory.
  • ls practice

When you call ls with an argument (a word following ls and separated from ls by a SPACE), ls displays the name of the file named by the argument or dis-plays an error message if the file does not exist. Call ls with the name of the file created in step 1 and the string xxxx (you must separate each argument from the next by a SPACE). What happens?

  • ls practice xxxx

ls: cannot access xxxx: No such file or directory practice

  1. As opposed tols, which lists the name of a file, the cat utility (Sobell, page 52) displays the contents of a file. Use the cat utility to display the con-tents of the file you just created.
  • cat practice

This is a small text file that I created using a text editor.

  1. Thecp utility (Sobell, page 53) makes a copy of a file. Use cp to make a copy of the file you just created.
  • cp practice practice2
  1. Therm utility (Sobell, page 52) removes (deletes) a file. Use rm to remove the file you created using vim; do not remove the copy of this file you made in the previous step.
  • rm practice
  1. After removing the file you created usingvim, what do ls and cat show when you list the name of and contents of that file?

Because that file no longer exists, ls does not list its name and cat reports that there is no such file; ls does show the copied file.

  1. Theless utility (Sobell, page 53), which was introduced in the previous lab, displays a file one screen at a time. Use the less utility to display a long file, such as /etc/services, one screen at a time and exit from less.
  • less /etc/services..
  • Labs for A Practical Guide to Linux Commands, Editors, and Shell Programming by Mark G. Sobell

Press the SPACE bar to display subsequent screens of text and press q to exit from less.

  1. By default, thehead utility (Sobell, page 57) displays the first 10 lines of a file. Use head to display the first 10 lines of a file such as /etc/services.
  • head /etc/services
  1. By default, thetail utility (Sobell, page 57) displays the last 10 lines of a file. Use tail to display the last 10 lines of a file such as /etc/services.
  • tail /etc/services.
  1. Thehostname utility (Sobell, page 53) displays the name of the system you are working on. Use hostname to display the name of the system you are working on.
  • hostname guava
  1. Themv utility (Sobell, page 53) renames a file. Use mv to rename the copy of the file you made in step 4.
  • mv practice2 practice
  1. Thelpr utility (Sobell, page 55) sends a file to the printer. Use lpr to print the file you renamed in step 11.
  • lpr practice
  1. Thegrep utility (Sobell, page 56) searches for a string of characters in a file. Use grep to display all lines that contain a string (such as small) in the file you renamed in step 11.
  • grep small practice

This is a small text file that I created

  1. Using thevim editor, create a file named days that holds the names of the days of the week, in calendar order. Use cat to display the file.
  • cat days Monday Tuesday Wednesday Thursday Friday Saturday Sunday
  1. Thesort utility (Sobell, page 58) displays a file in alphabetical order. Use sort to display the days file you created in step 14 in alphabetical order.

Deliverables

This lab gives you practice creating files using the vim editor and an understanding of how to use a few common utilities in their simplest forms. When you use script to capture your work in the lab, you can turn the resulting file in to your instructor.

ULI101 Introduction to UNIX/Linux and the Internet

Answer in Detail


Solved by qualified expert

Get Access to This Answer

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

34 More Pages to Come in This Document. Get access to the complete answer.

The prime concern of MyAssignmenthelp.com is customer satisfaction by rendering premium quality content. We make genuine efforts to solve all problems of customers, leaving none of the queries unanswered. We encourage students from UK, US and Australia to repeat their orders with our world-class services. MyAssignmenthelp.com is the only brand with 3000+ superlative writers in different subject background. Blend with the perfect combination of speed and aptitude, our PhD authors makes assignment delivery faster than a blink. Custom essay help, online assignment help and dissertation writing services are considered as primary concern of MyAssignmenthelp.com. Dont worry if you are stuck with your essays at mid-night. We are working day and night to serve at the time suitable for you.

More ULI101 ULI101 Introduction to UNIX/Linux and the Internet: Questions & Answers

COMP SCI3012 Distributed Systems

Questioin:
Implementing Paxos for electing a leader from different profiles using Java.
Objective
To gain an understanding of consensus and voting protocols in the presence of failures of one or more of the participants.
Task:
Write a program that implements a Paxos voting protocol for Suburbs …

View Answer

ECE9020L programming

The following itemized requirements are an informal representation of a set of assignments that comprises the design of a simple sketch drawing program (along with an implementation that can be targeted to any platform of the students` choice). The program layout should consist mainly of a 2D drawin …

View Answer

7COM1032 Artificial Life and Robotics

Question:
· Late submission of referred coursework will automatically be awarded a grade of zero (0).
· Coursework (including deferred coursework) submitted later than five days (five working days in the case of hard copy submission) after the published deadline will be awarded a gra …

View Answer

Management

This assessment focuses on data integration and reshaping. You will be required to integrate data that might be collected from different sources. You will need to resolve different levels of conflicts in integration according to what we have discussed in the lectures. The output of this assessment s …

View Answer

Content Removal Request

If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.com then please raise the
content removal request.

Choose Our Best Expert to Help You

Still in Two Minds? The Proof is in Numbers!

33845 Genuine Reviews With a Rating of 4.9/5.

Management

Assignment: 3 Pages, Deadline:
23 days

Good assignment and good support.It is important to review plagiarism and grammer

User ID: 3***11 Qatar

Finance

Assignment: 1 Page, Deadline:
3 days

This PowerPoint presentation is well-done. It fits well with this finance course and the individual did an excellent job. Thank you so much!

User ID: 8***35 Saint Louis, United States

Marketing

Assignment: 11.2 Pages, Deadline:
5 days

Good job done. The assignment is well written, can get higher grade if can provide more in-depth analysis on the topic

User ID: 8***66 Saint Louis, Hong Kong

Marketing

Home Work: 11 Pages, Deadline:
4 days

Overall well written essay, excellent and complete writing in one day, and the Expert prompt reply on comments

User ID: 8***66 Saint Louis, Hong Kong

HRM

Case Study: 8 Pages, Deadline:
6 days

Thanks for your effort. I appreciate it. I have grated 60, which is enough to pass.

User ID: 8***12 Dublin, Ireland

Finance

Home Work: 4 Pages, Deadline:
7 days

The excel formulas were perfect. But the explanation regarding the recommendation was subpar.

User ID: 5***90 Dublin, United States

Physics

Home Work: 1 Page, Deadline:
2 days

Wonderful as always! Very professional and knowledgeable! I love this experts work and always use them when it comes to Physics.

User ID: 6***06 Atlanta, United States

Healthcare

Assignment: 8 Pages, Deadline:
4 days

Really appreciate this work which help me to get 8.9 out of 10. i would like to express thanks to expert.

User ID: 5***91 Atlanta, Malaysia

Healthcare

Assignment: 12 Pages, Deadline:
7 days

Good work . it was help me lots. i got 6.5 out of 10 which is good score for me.

User ID: 5***91 Atlanta, Malaysia

Assignment

Essay: 5 Pages, Deadline:
3 days

amazing results, received a High grade thank you very much, appreciate the help. Can’t wait to have more assignments so you guys can help me.

User ID: 5***22 Atlanta, Switzerland

Assignment

Essay: 1 Page, Deadline:
3 days

Hello, Thanks for the quick delivery. And the job well done. looking forward to do more.

User ID: 5***06 Atlanta, Canada

Management

Essay: 4 Pages, Deadline:
4 days

Thanks for quick delivery. I will go through it and see what you have done. Yet to be graded

User ID: 5***06 Atlanta, Canada

Statistics

Course Work: 7 Pages, Deadline:
1 day

Great work- Job well done!! Work was completed before schedule.I Would highly recommend this service to others.

User ID: 8***59 Atlanta, United States

It Write Up

Assignment: 10 Pages, Deadline:
11 days

thank you a lot for helping me with the assignment and doing this so on time . you did exactly what i wanted you to do. i am very satisfied .

User ID: 8***43 Atlanta, Netherlands

Programing

Programming: 1 Page, Deadline:
10 days

thanks i had a good grade although it took so many back and forth i hope it wont happen again

User ID: 6***09 Atlanta, Philippines

Healthcare

Assignment: 1 Page, Deadline:
9 hours

Thanks for helping me understand my assignment and also helping me with the write up.

User ID: 8***87 Atlanta, United States

Accounting

Programming: 6.4 Pages, Deadline:
6 days

Excellent Service, Professional and Complete Writing. Will sure contact for further future assignments.

User ID: 8***38 Atlanta, Australia

Finance

Home Work: 2 Pages, Deadline:
3 days

Thankfully, I received one of the best marks awarded for the kind of work given. I am grateful to my assignment help team for their assistance

User ID: 2***85 Atlanta, Ghana

Business Law

Home Work: 1 Page, Deadline:
1 hour

Thank you for your service. Really appreciate that you make my assignment within time

User ID: 7***52 Atlanta, Canada

Management

Assignment: 2 Pages, Deadline:
7 days

Thank you Expert, my professor regraded my work and gave me a good grade this time. but he also mention that going forward i should be more detailed i …

User ID: 2***97 Upper Marlboro, United States

Management

Assignment: 3 Pages, Deadline:
23 days

Good assignment and good support.It is important to review plagiarism and grammer

User ID: 3***11 Qatar

Finance

Assignment: 1 Page, Deadline:
3 days

This PowerPoint presentation is well-done. It fits well with this finance course and the individual did an excellent job. Thank you so much!

User ID: 8***35 Saint Louis, United States

Marketing

Assignment: 11.2 Pages, Deadline:
5 days

Good job done. The assignment is well written, can get higher grade if can provide more in-depth analysis on the topic

User ID: 8***66 Saint Louis, Hong Kong

Marketing

Home Work: 11 Pages, Deadline:
4 days

Overall well written essay, excellent and complete writing in one day, and the Expert prompt reply on comments

User ID: 8***66 Saint Louis, Hong Kong

HRM

Case Study: 8 Pages, Deadline:
6 days

Thanks for your effort. I appreciate it. I have grated 60, which is enough to pass.

User ID: 8***12 Dublin, Ireland

Finance

Home Work: 4 Pages, Deadline:
7 days

The excel formulas were perfect. But the explanation regarding the recommendation was subpar.

User ID: 5***90 Dublin, United States

Physics

Home Work: 1 Page, Deadline:
2 days

Wonderful as always! Very professional and knowledgeable! I love this experts work and always use them when it comes to Physics.

User ID: 6***06 Atlanta, United States

Healthcare

Assignment: 8 Pages, Deadline:
4 days

Really appreciate this work which help me to get 8.9 out of 10. i would like to express thanks to expert.

User ID: 5***91 Atlanta, Malaysia

Healthcare

Assignment: 12 Pages, Deadline:
7 days

Good work . it was help me lots. i got 6.5 out of 10 which is good score for me.

User ID: 5***91 Atlanta, Malaysia

Assignment

Essay: 5 Pages, Deadline:
3 days

amazing results, received a High grade thank you very much, appreciate the help. Can’t wait to have more assignments so you guys can help me.

User ID: 5***22 Atlanta, Switzerland

Assignment

Essay: 1 Page, Deadline:
3 days

Hello, Thanks for the quick delivery. And the job well done. looking forward to do more.

User ID: 5***06 Atlanta, Canada

Management

Essay: 4 Pages, Deadline:
4 days

Thanks for quick delivery. I will go through it and see what you have done. Yet to be graded

User ID: 5***06 Atlanta, Canada

Statistics

Course Work: 7 Pages, Deadline:
1 day

Great work- Job well done!! Work was completed before schedule.I Would highly recommend this service to others.

User ID: 8***59 Atlanta, United States

It Write Up

Assignment: 10 Pages, Deadline:
11 days

thank you a lot for helping me with the assignment and doing this so on time . you did exactly what i wanted you to do. i am very satisfied .

User ID: 8***43 Atlanta, Netherlands

Programing

Programming: 1 Page, Deadline:
10 days

thanks i had a good grade although it took so many back and forth i hope it wont happen again

User ID: 6***09 Atlanta, Philippines

Healthcare

Assignment: 1 Page, Deadline:
9 hours

Thanks for helping me understand my assignment and also helping me with the write up.

User ID: 8***87 Atlanta, United States

Accounting

Programming: 6.4 Pages, Deadline:
6 days

Excellent Service, Professional and Complete Writing. Will sure contact for further future assignments.

User ID: 8***38 Atlanta, Australia

Finance

Home Work: 2 Pages, Deadline:
3 days

Thankfully, I received one of the best marks awarded for the kind of work given. I am grateful to my assignment help team for their assistance

User ID: 2***85 Atlanta, Ghana

Business Law

Home Work: 1 Page, Deadline:
1 hour

Thank you for your service. Really appreciate that you make my assignment within time

User ID: 7***52 Atlanta, Canada

Management

Assignment: 2 Pages, Deadline:
7 days

Thank you Expert, my professor regraded my work and gave me a good grade this time. but he also mention that going forward i should be more detailed i …

User ID: 2***97 Upper Marlboro, United States

Have any Query?

The post Labs for A Practical Guide to Linux appeared first on study tools.

Don`t copy text!
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
???? Hi, how can I help?