Linux HW 2

profilefoooq55
IFT250Lab2B.docx

<[Spring 2018]>

IFT 250: Shell & Script Programming with Unix

Lab Activity 2B: Shell Commands

Learnings

· Basic UNIX commands

· Advanced UNIX commands

· Useful applications of UNIX commands

Part I: Basic Commands

List the commands that you would use to complete the following tasks:

1. List the contents of your current directory

1. List the contents of a directory inside your current directory

2. List the contents of the directory above your current directory

3. List the contents of your current directory tree

4. View the contents of the lab2.1 file

5. Combined the files lab2.1, lab2.2, and lab2.3 into the file lab2.sub

6. create an empty file named lab2.4

7. Print your current working directory

8. Change your current directory to a grand-parent directory

9. Print your current working directory

10. Return to your previous directory

Part II: Advanced Commands

List the commands that you would use to complete the following tasks:

1. Locate the file lab2.2 starting from your home directory.

1. Locate all the files with “lab2” in the filename using find starting from the root directory

2. Create a directory named lab2.dir

3. Move the file lab2.1 into the directory lab2.dir with the name lab2.1.r

4. Make a copy of the file lab2.2 named lab2.2.c

5. Duplicate the directory Lab2.dir named Lab2.bak

6. Create a tar file archive called lab2.tar containing the files lab2.1, lab2.2, and lab2.3

7. Create a zip file archive called lab1.zip from compressed lab2.1, lab2.2, and lab2.3

8. Create a zip file archive of your home directory called home.zip

Page | 4