# Practical Part A

### **Practical - Part A**

##### **Task 1: Work from the Terminal Linux. (Total 16)**

 (Q1 to Q7 Critical) (<u>2 Marks for each correct answers</u>)

Create a directory in your home directory (**~**) named **Assessment3\_ {Your Class}**

<table id="bkmrk-which-command-did-yo" style="height: 140px;"><tbody><tr style="height: 35px;"><td rowspan="4" style="height: 140px; width: 210px;">Which command did you use?

</td><td style="height: 35px; width: 357px;"></td></tr><tr style="height: 35px;"><td style="height: 35px; width: 357px;"></td></tr><tr style="height: 35px;"><td style="height: 35px; width: 357px;"></td></tr><tr style="height: 35px;"><td style="height: 35px; width: 357px;"></td></tr></tbody></table>

Create two directory’s named **Source** and **Destination** in the **Assessment3\_ {Your Class}** directory just created

<table id="bkmrk-which-command-did-yo-0" style="height: 140px;"><tbody><tr style="height: 35px;"><td rowspan="4" style="height: 140px; width: 210px;">Which command did you use?

</td><td style="height: 35px; width: 357px;"></td></tr><tr style="height: 35px;"><td style="height: 35px; width: 357px;"></td></tr><tr style="height: 35px;"><td style="height: 35px; width: 357px;"></td></tr><tr style="height: 35px;"><td style="height: 35px; width: 357px;"></td></tr></tbody></table>

- Create two files named **txt** and **File2.txt** inside **Assessment3\_ {Your Class}/Source**

<table id="bkmrk-which-command-did-yo-1"><tbody><tr><td rowspan="4" width="210">Which command did you use?

</td><td width="357"></td></tr><tr><td width="357"></td></tr><tr><td width="357"></td></tr><tr><td width="357"></td></tr></tbody></table>

Write your **Name** and **DOB** in FILE1.txt using a Linux editor (**VI, Pico or Nano)**

<table id="bkmrk-which-exactly-the-co"><tbody><tr><td rowspan="4" width="214">Which **Exactly** the commands keys you use?

</td><td width="353"></td></tr><tr><td width="353"></td></tr><tr><td width="353"></td></tr><tr><td width="353"></td></tr></tbody></table>

Copy only the **txt** files from **Source** to **Destination**

<table id="bkmrk-which-command-did-yo-2" width="564"><tbody><tr><td rowspan="4" width="214">Which command did you use?

</td><td width="350"></td></tr><tr><td width="350"></td></tr><tr><td width="350"></td></tr><tr><td width="350"></td></tr></tbody></table>

Apply the following permissions to the **Assessment3\_ {Your Class}** Director (User Read Write Execute, Group Read, Other Read)

<table id="bkmrk-which-command-did-yo-3"><tbody><tr><td rowspan="4" width="214">Which command did you use?

</td><td width="353"></td></tr><tr><td width="353"></td></tr><tr><td width="353"></td></tr><tr><td width="353"></td></tr></tbody></table>

Pipe a directory listing using long listing format of the contents of you **Assessment3\_ {Your Class}** directory as **txt** in **Assessment3\_ {Your Class}**

<table id="bkmrk-which-command-did-yo-4"><tbody><tr><td rowspan="4" width="214">Which command did you use?

</td><td width="353"></td></tr><tr><td width="353"></td></tr><tr><td width="353"></td></tr><tr><td width="353"></td></tr></tbody></table>

**Create** and test a Linux batch Script called **sh** that contains all the previous commands print and save in **Assessment3\_{Your Class}** director.

<table id="bkmrk-which-command-did-yo-5"><tbody><tr><td rowspan="4" width="214">Which command did you use?

</td><td width="353"></td></tr><tr><td width="353"></td></tr><tr><td width="353"></td></tr><tr><td width="353"></td></tr></tbody></table>