Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*Could you lett me know if I'm doing correctly and assist me with other questions and explain the process? CIS 1130 UNIX/Linu x Hands-on Test

*Could you lett me know if I'm doing correctly and assist me with other questions and explain the process?

CIS 1130

UNIX/Linu

x Hands-on Test

A. Building the directory tree:

Using various UNIX commands, build the following directory structure from your home directory. Files end in an extension such as txt, doc or dat. For the contents of the file, put the file name in it and then at least one other line of text of your choice.

$HOME

|

Test

|

____________|___________________________________

| | | |

| | | |

Pay dirY cactus.txt Production

| |______________ |

___|____ | | | |

| | dirM dirN dirO ______|______

payroll1 payroll2 | | | | | ____ | _____ file2.txt | |

__|____ | | ProdA ProdB

| | subA subB |

payA.doc payB.doc | ______|_______

salesA.doc | | |

p1.dat p2.dat p3.txt

B. Using UNIX/Linux commands:

Assume your current directory is $HOME/Test for each of these unless otherwise noted. ONLINE students please write your responses in blue so they will stand out for me.

1. Copy salesA.doc to the directory named ProdB. Write the command(s):

cp A:/$HOME/Test/salesA.doc ProdB

2. Rename the file named p1.dat to p5.dat. Write the command(s):

rn A:/$HOME/Test/Production/ProdA/p1.dat p5.dat

3. Redirect the text hello to a new file named FileG.dat. Place the file in the payroll2 directory. Write the command(s):

echo A:/$HOME/Test/payroll2/ hello>>FileG.dat

4. Append the date output to the file named FileG.dat. Write the command(s):

5. Create a file in ProdB named unsort.dat with the following data:

4

1

5

3

2

Write the command(s):

6. Display the contents of the file. Write the command(s):

cat A:/$HOME/Test

7. Sort the file named unsort.dat and redirect the output to a new file named sort.dat. The sorted file should also be in the ProdB directory. Write the command(s):

8. Using one command, delete all files ending in .dat located in the directory named ProdA. Write the command(s):

9. Remove the directory dirM. Write the command(s):

rmdir A:/$HOME/Test/dirY/dirM

10. Change permissions of the file named p3.txt to be rwxr-xr-x and write the command(s):

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

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions