COMP83 Lab 1

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

COMP 83

LINUX 1
Lab 1

Student Name: Dilpreet singh

Student ID: 4326286

Date: 07 /06 /2021


/
Budget
root
Payroll
Finance
Staff
HR
Data

Figure 1
The name of your machine should be yourname-XXX, example, Mohit-569.

Perform the following tasks using the Linux command-line tool (2m each):

a) Create the directory structure in Figure 1 above.


b) Practicing changing directory by doing the following:

i. Start with Payroll as the present working directory, change the


directory to Staff using absolute path.

ii. From Staff, change directory to Data using relative path.

iii. From Data, change directory to Finance using relative path.


iv. From Finance, change directory to Data using absolute path.

v. From Data, change directory to Staff using relative path.

vi. From Staff, change directory to HR using relative path.


vii. From HR, change directory to Payroll using relative path.

viii. From Payroll, change directory to Finance using absolute path.


ix. From Finance, change directory to Budget using relative path.

x. From Budget, change directory to the root user directory using


relative path.
xi. From the root user directory, Change directory to the root of the Linux
directory.

c) In the Data directory, create the following empty files

i. Three hidden files: .info1, .info2, .info3

ii. Three regular files: data1.txt, data2.txt, data3.txt


d) Display the contents of the Data directory using the following ls commands
and notice the difference:

i. ls

ii. ls -a

iii. ls -l
iv. ls -i

v. ls -al
vi. ls -il

vii. ls -ail

e) Copy data1.txt to record1.txt


f) Rename data2.txt to record2.txt

g) Delete data1.txt
h) Move data3.txt to the Budget directory

i) Move .info2 to Finance directory and rename the file .Rec2. Do this using a
single command.
j) Copy .info1 to HR directory
k) Delete the empty directory Staff

l) Delete the non-empty directory Data


m) Delete the Finance and HR directories to end this exercise.
Marking Rubrics
No submission 0/10
Complete or incomplete submission after cut 3/10
off time
Complete less than 80% of task before cut off 5/10
time
Complete less than 80% of task within time 6/10
limit
Complete at least 80% of task before cut off 7/10
time
Complete at least 80% of tasks within time 8/10
limit
Complete all tasks before the cut off limit 9/10
Complete all tasks within time limit 10/10

Mark:__________
END

You might also like