0% found this document useful (0 votes)
28 views

Student'S Name: Muhammad Asyraf Bin Abdullah Zawawi Registration Number: 03DIP12F1019 Class: DIP 5A Lab Exercise 2 (20 Marks)

This document contains the answers to a lab exercise for a student named Muhammad Asyraf Bin Abdullah Zawawi. The answers are: 1. The command to change the working directory to the home directory is "cd /home". 2. The difference between the rm and rmdir commands is that rm deletes files while rmdir removes empty directories. 3. The commands to create 4 files named file1, file2, file3, and file4 are "touch file1 file2 file3 file4" and "touch file{1..4}".

Uploaded by

Irfan Fazail
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Student'S Name: Muhammad Asyraf Bin Abdullah Zawawi Registration Number: 03DIP12F1019 Class: DIP 5A Lab Exercise 2 (20 Marks)

This document contains the answers to a lab exercise for a student named Muhammad Asyraf Bin Abdullah Zawawi. The answers are: 1. The command to change the working directory to the home directory is "cd /home". 2. The difference between the rm and rmdir commands is that rm deletes files while rmdir removes empty directories. 3. The commands to create 4 files named file1, file2, file3, and file4 are "touch file1 file2 file3 file4" and "touch file{1..4}".

Uploaded by

Irfan Fazail
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Students Name: MUHAMMAD ASYRAF BIN ABDULLAH ZAWAWI

Registration Number: !DI"#$F##%


&'ass: DI" (A
Lab )*er+ise $ ,$ Mar-s.
1. Write the command to change the working directory to home directory
cd /home____________________________________________ (1 marks)
2. What is the deferences between rm command and rmdir command in term of function.
rm rmdir
Deleting directory /file o delete file o remo!e directory
"#am$le of command
rm flename
rmdir directoryname
(% marks)
&. Write 2 command to create % file name '()*1+ '()*2+ '()*& and '()*%.
i) touch '()*1 '()*2 '()*& '()*%_______________________________
ii) touch '(,)*1..)*%-___________________________________________ (2 marks)
%. Write the command to co$y file '()*1 to Deskto$
cd '()*1 Deksto$____________________________________________ (1 marks)
). (rint screen what you get from the .cti!ity )
(2 marks)
/. 0ist the ste$ to create a directory name 0.12 then delete the directory.
i) 2$en 3ome 'older+ right click and choose 4reate Document and rename as 0.12 .
ii) 5ight click on folder and choose 6o!e to rash . (% marks)
7. Write the command line to link '()*1 file by using symbolic link from 3ome
directory to Documents directory with a same filename '()*1.

i) ln 8s /home/asyrafgaim/'()*1 /home/asyrafgaim/Documents/'()*1
ii) _______________________________________________________
iii) _______________________________________________________ () marks)
9. 0ist the ste$ to link files '()*2 using :autilus.
i) 2$en 'ile 6anager and locate for the files ._______________________
ii) 5ight click on folder and choose 6ake 0ink .______________________ (1 marks)

You might also like