Lab 5 Title : Understanding on File system Operation and Protection Mechanism
Objective : 1. To enable student with common file system operation for Ubuntu and
Windows Command Line.
2. To motivate student to explore more on file system concept such as
file protection in Ubuntu and Windows.
Prerequisit Student must bring own laptop with windows installation ready, Bootable USB
es Flash Drive with Ubuntu image.
Method Method 1 : To exercise on file system operation via Ubuntu and Windows
Command
File System Ubuntu Windows Command
Operation
1. Change cd / -Takes you to the root cd .. - Takes you up one
Directory. directory. directory level.
cd .. - Takes you up one
directory level.
cd - - Takes you to the previous
directory. cd <folder name>
change directory to
cd <folder name> folder name.
FINDINGS C:\ users\ users> cd
C:\ users
2. print working pwd Cd
directory.
FINDINGS C: \ wanhg \ notes > cd
C: \ wanhg \ notes>
3. Lists all files ls -la dir /A
and folders in
your current
working
directory (all
attributes).
FINDINGS C:\wanhg\notes>dir/A
Volume in drive C is Windows
Volume Serial Number is 182B A33E
Directory of C:\Hazim\notes
02/12/2023 9:06 PM <DIR>
02/12/2023 9:02 PM <DIR>
31/01/2023 10:08 PM
91,231 Isabella's lullaby.pdf
1 File(s) 91,231 bytes
2 Dir(s) 176,150,282,240 bytes
free
4. Creating a file. Vi csc204.txt (using vi Start notepad csc204.txt
editor) (using notepad)
5. Writing a file. Writing a file into csc204.txt Writing a file into
welcome to csc204 class” csc204.txt
–write and quit. welcome to csc204
class-save and exit.
FINDINGS
6. View the file more csc204.txt or more csc204.txt
content cat csc204.txt
FINDINGS
7. Copy a file to cp csc204.txt /home copy csc204.txt
new location. /Documents
FINDINGS
8. Move a file to a mv csc204.txt /home move csc204.txt
new /Documents
location.(same
like copy)
FINDINGS
9. Rename a file. cp csc204.txt cs110.txt rename csc204.txt
cs110.txt
FINDINGS
10. Removing a rm –rf cs110.txt del cs110.txt
file.
FINDINGS
11. Search a file find csc* find “string” csc204.txt
FINDINGS
12. Create mkdir CS110 mkdir CS110
directory
FINDINGS
13. Remove rmdir –rf CS110 rmdir CS110
directory
FINDINGS
Step 2 : file system protection
Using the same file name csc204.txt created in step 1, student able to explore the
protection mechanism which provide the control access in both Ubuntu and
Windows Operating System.
File Protection
Ubuntu Windows
Follow the following command: Right click at file name csc204.txt
and select the properties. Under
Security option, permission for
SYSTEM determine the type of
access control.
Access Control:
Owner : user who created the file
Group: set of users.
Others: all other users in the
system.
FINDINGS
1. Mode Of Access 1. Print screen the finding
R Read
W Write
X Execute
2. Print screen the finding after
following command and fill the
file protection table
ls –la csc204.txt.
Access Control Mode Of
Access
Owner Rw
Group Rw
Public/other R
access
1. Print screen the finding after
following command and fill the
file protection table
2. Identify the mode of
chmod 777 csc204.txt
access
ls –la
Full control Modify
Read and List folder
execute content
Read Write
Access Control Mode Of
Access
Owner Rwe
Group Rwe
Public/other
access Rwe