Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create two directories: MyOldDir and MyNewDir in your home directory. [Screen shot#1 that shows commands that create these directories.] Create 2 files: MyOldFile1 and MyOldFile2

  1. Create two directories: MyOldDir and MyNewDir in your home directory.

[Screen shot#1 that shows commands that create these directories.]

  1. Create 2 files: MyOldFile1 and MyOldFile2 in MyOldDir. Make sure to put some text of your choice in these files.

[Screen shot#2 that displays the contents of these files.]

  1. Create 2 files MyNewFile1 and MyNewFile2 in MyNewDir. Make sure to put some text of your choice in these two files.

[Screen shot#3 that displays the contents of these files.]

  1. Show the directory listing to make sure the directories and the files exist.

[Screen shot#4 that displays the contents of these files.]

  1. Using symbolic notation, assign read and execute permissions to MyOldFile1, write and execute permissions to MyOldFile2. Remove all permissions from MyNewFile1 and MyNewFile2 using numeric notation.

[Screen shot#5 that displays all the file permissions as directed.]

  1. Create a file named XXA1bT6a (replace XX by your last name). Populate the file with the following entries:

Monkey:Banana:6000:5000.00

Camel:Raw Meat:4000:5400.00

Lion:Raw Meat:3500:3300.00

Elephnt:Hay:2090:10760.00

Dog:Dog Food:5000:2100.00

Fox:Chicken:5000:3000.00

Horse:Grass:7000:9000.00

Cat:Cat Food:2000:8000.00

Deer:Plant Leaf:3400:9800.00

Crocodile:Raw Meat:9000:7800.00

[Screen shot#6 that displays the contents of this file.]

  1. Copy the file to another file named XXA1bT6b (replace XX by your last name).

[Screen shot#7 that displays the contents of the copied file.]

  1. With a single command, compare the files XXA1bT6a to XX1bT6b. Explain the output.

[Screen shot#8 that displays the result of the comparison.]

  1. Append an extra line (different from other lines) to the file XXA1bT6a. Compare again the files XXA1bT6a and XXA1bT6b at this point. Explain the output.

[Screen shot#9 that displays the result of the comparison.]

  1. Append an extra line (different from other lines) to the file XXA1bT6b. Compare the files XXA1bT6a and XXA1bT6b at this point. Explain the output.

[Screen shot#10 that displays the result of the comparison.]

  1. Write a single command that finds the differences between the files XXA1bT6a and XXA1bT6b. Explain the output.

[Screen shot#11 that displays the result of the comparison.]

  1. Write commands that finds number of lines, bytes, and words in both the files.

[Screen shot#12 that displays the output.]

  1. Create a file named XXAlbT13(replace XX by your last name). Populate the file with the following entries:

Syed#Yamin#60000#5000.00#FT

John#Travolta#36000#3000.00#PT

Ilya#Nika#72000#6000.00#FT

Sanjida#Nasreen#12000#1000.00#PT

Petros#Passass#48000#4000.00#PL

Mohammad#Ali#96000#8000.00#FT

Neil#Armstrong#84000#7000.00#FT

Atiq#Rahman#18000#1500.00#PT

Nihar#Rana#12000#1000.00#PT

Sohel#Rana#24000#2000.00#PT

John#Travolta#36000#3000.00#PT

Ilya#Nika#72000#6000.00#FT

Mohammad#Ali#96000#8000.00#FT

Syed#Yamin#60000#5000.00#FT

Neil#Armstrong#84000#7000.00#FT

Atiq#Rahman#18000#1500.00#PT

Nihar#Rana#12000#1000.00#PT

Sohel#Rana#24000#2000.00#PT

Sanjida#Nasreen#12000#1000.00#PT

Petros#Passass#48000#4000.00#PL

[Screen shot#13 that displays the contents of this file.]

[Question nos. 14, 15, 16, 17, 18, 19, and 20 relate to the file you just created: XXA1bT13]

  1. Issue a single command that shows the last five lines of the file.

[Screen shot#14 that displays the output.]

  1. Issue a single command that shows the first nine lines of the file.

[Screen shot#15 that displays the output.]

  1. Issue necessary commands that will show only the lines that are not repeated in the file XXA1bT13. Redirect the output to a file named XXN1. Display the contents of XXN1.

[Screen shot#16 that displays all the necessary commands to accomplish the task with the output. The screen shot should also display the contents of the file XXN1.]

  1. Issue necessary commands that will show only the lines that are repeated in the file XXA1bT13. Redirect the output to a file named XXN2. Display the contents of the file XXN2.

[Screen shot#17 that displays all the necessary commands to accomplish the task with the output. The screen shot should also display the contents of the file XXN1.]

  1. Combine the files XXN1 and XXN2. Redirect the output to a file named XXN3.

[Screen shot#18 that displays all the necessary commands to accomplish the task with the output. The screen shot should also display the contents of the combined file XXN3.]

  1. Merge the files XXN1 and XXN2. Redirect the output to a file named XXN4.

[Screen shot#19 that displays all the necessary commands to accomplish the task with the output. The screen shot should also display the contents of the merged file XXN4.]

  1. Issue a single command that sorts the file XXN1 by its second field in reverse order.

[Screen shot#20 that displays the files reversely sorted contents. Remember that the file must be sorted by its second field.]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions