OPERATING SYSTEMS (LAB 2 WITH FORMAT)
OPERATING SYSTEMS (LAB 2 WITH FORMAT)
LAB : 02:
BASIC SHELL COMMANDS:
chmod Command:
What is chmod?
The chmod command is used to change the file permissions of a file or directory in
Unix and Linux systems. Permissions determine who can read, write, or execute a file.
Read (r): Permission to read the contents of a file or list the contents of a directory.
Write (w): Permission to modify the contents of a file or add/delete files in a directory.
Execute (x): Permission to run a file as a program or script.
Permission Levels
Symbolic Notation
To add permission: +
To remove permission: -
To set permission: = (exactly that permission)
EXAMPLES
chmod u+x filename
Common Options
-c: Create a new archive.
-x: Extract files from an archive.
-t: List the contents of an archive.
-f: Specifies the name of the archive file (this option is required).
-v: Verbosely list files processed (optional, for visibility).
-z: Compress the archive using gzip (optional).
-j: Compress the archive using bzip2 (optional).
-C: Change to a directory before performing operations (optional).
TASKS
Task 1: File Management
1. Create a new directory called Lab_Manual.
2. Inside Lab_Manual, create three subdirectories: Commands, Scripts, and Notes.
3. Create a text file in the Notes directory called summary.txt and write a summary of
basic shell commands.
Task 4: Networking
1. Use the ping command to check the connectivity to google.com.
2. Use the traceroute command to trace the path taken to reach google.com.