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

Systems Programming - Lab1

The document provides instructions for a systems programming lab assignment. It outlines familiarizing oneself with basic Linux commands and performing tasks like changing file permissions, checking system details, combining files, searching files, and getting directory sizes. Students are asked to complete the outlined tasks and submit a zip file with commands and screenshots.

Uploaded by

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

Systems Programming - Lab1

The document provides instructions for a systems programming lab assignment. It outlines familiarizing oneself with basic Linux commands and performing tasks like changing file permissions, checking system details, combining files, searching files, and getting directory sizes. Students are asked to complete the outlined tasks and submit a zip file with commands and screenshots.

Uploaded by

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

Systems Programming – Lab Manual

______________________________________________________________________________

Lab 1 – OS Familiarity and Basic Shell Commands

Section A: There is no submission for this part of the assignment


• Install Ubuntu in Virtual Machine by the steps provided to you in Course
Detail PPT, if not already done so.
• Get familiarity with Unix/Linux environment – Login, editors gedit/vi, etc
• Get familiarity with directory commands and their options: ls, cd, mkdir,
rmdir, pwd
• Get familiarity with file operation commands with its options: cp, mv, rm,
cat, head, tail, more, less, chmod, chown etc
• Use redirection operators (>, >>, <) and pipe (|) operator
• Run examples from class presentations (and others) of awk, grep, find, sed
and cut commands for file editing operations to understand how they work.

Section B: In this part of the assignment, you will be required to write shell
commands to perform the following functions. After executing each command,
capture the output in image format.
1. Change the permission of abc.sh to allow read, write and execute
permission for the current user but only read and execute for the group
and other users.
2. Display the OS and kernel versions that your system is currently running.
3. First, create two text files in1.txt and in2.txt using some editor (Gedit, Vi,
etc.). Create a new directory MyOut in the home directory and create a
third file out.txt in MyOut, which has combined content from both the
input files. (Hint: use redirection operators)
4. Search for a given word in all the three text files (in1.txt, in2.txt and out.txt)
5. Using the awk command, display the current directory's total size, including
all subdirectories in MegaBytes.
6. Display only the time part using date and cut shell commands.
Submission:
StudentID.zip with all commands and screen shorts from Section B.

You might also like