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

MajorAssignment 1 2019

Students are required to submit major assignments after practicing minor assignments. They must submit the commands or programs used to get the desired output for each question. The submission must follow specific guidelines, including naming the file using the student's first name, registration number and assignment name, including a file header, and typing the commands issued for each question. The document then lists several questions requiring commands related to file and directory manipulation, process management, and output redirection.

Uploaded by

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

MajorAssignment 1 2019

Students are required to submit major assignments after practicing minor assignments. They must submit the commands or programs used to get the desired output for each question. The submission must follow specific guidelines, including naming the file using the student's first name, registration number and assignment name, including a file header, and typing the commands issued for each question. The document then lists several questions requiring commands related to file and directory manipulation, process management, and output redirection.

Uploaded by

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

Department of Computer Science and Engineering

Institute of Technical Education & Research, SOA, Deemed to be University

MAJOR ASSIGNMENT-1
UNIX Systems Programming (CSE 3041)

Familiarization with UNIX Files and Common commands, Directories, Input-Output


redirections, Pipes, Processes and Tailoring the Environment
Students are required to submit this major assignment after due practice of the minor assignments. They are
required to submit the commands or programs used to get the desired output for each question in soft copy.

Submission guidelines
The following points should be strictly followed for submission. Any deviation from the rule may lead to
zero credit for the assignment.

• Copied assignment is not allowed. If the assigment is found to be copied, all peers may be awarded
zero mark.

• You have to create a file named yourFirstname-registrationNumber-MA1.txt. for example file


name as Kunal1541012344-MA1

• File header maust be Major Assignment-1.

• Type the commands you have issued against each question and the subsequent subquestion if any.
Write the description and explanation for each question if it require so.

—————————————————————————————————————————

1. Starting from your HOME/REGISTRATION directory, describe what commands you would use to
do the following:

(a) Check your current location


(b) Create a directory Example: CSE X
(c) Move to CSE X
(d) Create a file using ed command and add 20 lines in this file
(e) copy this file to HOME/REGISTRATION directory
(f) long list of contents of directory HOME/REGISTRATION
(g) Create an empty file in HOME/REGISTRATION/CSE.ITER
(h) Move this file to HOME/REGISTRATION/CSE X from your current location HOME/REGIS-
TRATION
(i) Create a file in current location
(j) Rename this file
(k) Go to HOME Directory
(l) Remove this CSE X Directory

2. One of the programs you are running prints out a huge stream of text, forcing you to scroll up and
down on your terminal. What Keyboard shortcut can you use to force the output to stop and again
resume the printing flow?

1
Department of Computer Science and Engineering
Institute of Technical Education & Research, SOA, Deemed to be University

3. Your C program is stuck in an infinite loop. Describe how you would terminate your program: a)
using a key sequence b) using the kill command.

4. If you had a directory full of text named TXT 0001.txt ,TXT 0002.txt ...TXT 9999. how would you
do the followings:

(a) Delete all the files.


(b) Delete all the files from 0001 - 0009 .
(c) Delete all the files with numbers less than 0100.
(d) Print the content of files from 0011 to 0100 and 0202 to 0400.
(e) Print long list of TXT 00Y1.txt Y is any Integer.
(f) Count the total number of worlds in all files ends with 7.txt
(g) Remove the write permission of all files starts with TXT 01YY.txt where Y is integer
(h) Write the content of Files TXT 00Y5.txt to temp.txt file Where Y is a integer
(i) Append the content of Files TXT 000Y.txt to temp.txt file of question Q4.8
(j) Is it possible to rename files like mv TXT* TEXT*. Write your proper reasons.
(k) What is the output of following command on above files:: a) ls -l TXT ?21*.txt b) ls -l
TXT *21?.txt

5. How would you do the following:

(a) Start a program that runs in the background.


(b) List the jobs running in the background.
(c) List all of the processes a user is running.
(d) Bring a program in the background to the foreground.

6. You are currently in your working directory. Print the long list of all files and directory in reverse
sorted order. And also counts the total number of files and directories.

You might also like