Roll No. :... Invigilator's Signature : UNIX AND SHELL PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

Similar documents
Name :. Roll No. :... Invigilator s Signature : INTRODUCTION TO PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

QUESTION BANK ON UNIX & SHELL PROGRAMMING-502 (CORE PAPER-2)

UNIT I Linux Utilities

Roll No. :... Invigilator's Signature :.. CS/B.TECH(CSE/IT)/SEM-5/CS-501/ OPERATING SYSTEM. Time Allotted : 3 Hours Full Marks : 70

Please choose the best answer. More than one answer might be true, but choose the one that is best.

Unix Introduction to UNIX

UNIT I Linux Utilities and Working with Bash

Introduction to Linux

Outline. Cgroup hierarchies

Unix as a Platform Exercises. Course Code: OS-01-UNXPLAT

Table of contents. Our goal. Notes. Notes. Notes. Summer June 29, Our goal is to see how we can use Unix as a tool for developing programs

Outline. Cgroup hierarchies

D. Delete the /var/lib/slocate/slocate.db file because it buffers all search results.

Introduction to the UNIX command line

Roll No. :... Invigilator's Signature :. CS/B.Tech(CSE)/SEM-7/CS-701/ LANGUAGE PROCESSOR. Time Allotted : 3 Hours Full Marks : 70

Unix System Architecture, File System, and Shell Commands

SANJAY GHODAWAT POLYTECHNIC

History. 5/1/2006 Computer System Software CS012 BE 7th Semester 2

1Z Oracle Linux Fundamentals (Oracle Partner Network) Exam Summary Syllabus Questions

WRITE COMMANDS USING sed or grep (1 mark each) 2014 oct./nov march/april Commands using grep or egrep. (1 mark each)

St. MARTIN S ENGINEERING COLLEGE Dhulapally,Secunderabad DEPARTMENT OF INFORMATION TECHNOLOGY Academic year

5/20/2007. Touring Essential Programs

M.C.A. (Sem.-lll) (CBCS) Examination November CCA-3003 Operating System and LinuxlUnix programming

Linux & Shell Programming 2014

Exercise Sheet 2. (Classifications of Operating Systems)

Linux Shell Script. J. K. Mandal

UNIT V. Dr.T.Logeswari. Unix Shell Programming - Forouzan

The kernel is the low-level software that manages hardware, multitasks programs, etc.

UNIX Operating System

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING ACADEMIC YEAR / ODD SEMESTER

Appendix A GLOSSARY. SYS-ED/ Computer Education Techniques, Inc.

UNIX ASSIGNMENT 1 TYBCA (Sem:V)

IMPORTANT: Logging Off LOGGING IN

Welcome to Linux. Lecture 1.1

DEPARTMENT OF COMPUTER APPLICATIONS SRM INSTITUTE OF SCIENCE AND TECHNOLOGY SRM NAGAR, KATTANKALATHUR

Linux Command Line Primer. By: Scott Marshall

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

AC109/AT109 UNIX & SHELL PROGRAMMING DEC 2014

Department of Computer Science and Technology, UTU 2014

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015

Operating Systems Lab 1 (Users, Groups, and Security)

Linux Essentials. Smith, Roderick W. Table of Contents ISBN-13: Introduction xvii. Chapter 1 Selecting an Operating System 1

Set 1 MCQ Which command is used to sort the lines of data in a file in reverse order A) sort B) sh C) st D) sort -r

Name :. Roll No. :... Invigilator s Signature :.. CS/B.TECH (NEW)/SEM-2/CS-201/ BASIC COMPUTATION & PRINCIPLES OF COMPUTER PROGRAMMING

Course 144 Supplementary Materials. UNIX Fundamentals

On successful completion of the course, the students will be able to attain CO: Experiment linked. 2 to 4. 5 to 8. 9 to 12.

Linux Systems Administration Getting Started with Linux

Creating a Shell or Command Interperter Program CSCI411 Lab

LOG ON TO LINUX AND LOG OFF

Unix as a Platform Exercises + Solutions. Course Code: OS 01 UNXPLAT

EECE.4810/EECE.5730: Operating Systems Spring 2017

INTRODUCTION TO UNIX

CSE/ISE 311: Systems Administra5on Access Control and Processes

UNIX Essentials Featuring Solaris 10 Op System

Computer Programming C++ (wg) CCOs

Name :. Roll No. :... Invigilator s Signature : DATABASE MANAGEMENT SYSTEM

lsx [ls_options ] [names]

Roll No. :... Invigilator's Signature : GRAPHICS AND MULTIMEDIA. Time Allotted : 3 Hours Full Marks : 70

Perl and R Scripting for Biologists

Advanced training. Linux components Command shell. LiLux a.s.b.l.

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

SYLLABUS. Departmental Syllabus. Linux and Windows Practical Server. Departmental Syllabus. Departmental Syllabus. Departmental Syllabus

Teaching and Examination Scheme: PAPER HRS TH TU PR TH PR OR TW TOTAL

Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

SHRI ANGALAMMAN COLLEGE OF ENGINEERING AND TECHNOLOGY (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI

RH133. Red Hat Linux System Administration

Exam Linux-Praxis - 1 ( From )

Chapter 5: User Management. Chapter 5 User Management

Review of Fundamentals

Bharadia Jaydeep OS with Unix MCQ

Linux Administration

RedHat. Rh202. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs)

CS/CIS 249 SP18 - Intro to Information Security

RH-202. RedHat. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs)

100 SHELL PROGRAMS IN UNIX

TestOut Linux Pro - English 4.0.x OBJECTIVE MAPPING: CompTIA Linux+ LX0-103

Linux Essentials Objectives Topics:

LPIC-1 System Administrator

Using bash. Administrative Shell Scripting COMP2101 Fall 2017

COMPUTER SCIENCE SECTION A

A Big Step. Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers

5/8/2012. Creating and Changing Directories Chapter 7

SHELL SCRIPT BASIC. UNIX Programming 2014 Fall by Euiseong Seo

Linux Kung-Fu. James Droste UBNetDef Fall 2016

CST8207: GNU/Linux Operating Systems I Lab Ten Boot Process and GRUB. Boot Process and GRUB

System Programming. Introduction to Unix

Chapter 1. Getting started with UNIX

Scripting. Shell Scripts, I/O Redirection, Ownership and Permission Concepts, and Binary Numbers

Computer Systems and Architecture

Module 8 Pipes, Redirection and REGEX

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Computer Systems and Architecture

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

CST Algonquin College 2

Mastering Linux. Paul S. Wang. CRC Press. Taylor & Francis Group. Taylor & Francis Croup an informa business. A CHAPMAN St HALL BOOK

SHELL SCRIPT BASIC. UNIX Programming 2015 Fall by Euiseong Seo

Scripting. More Shell Scripts. Adapted from Practical Unix and Programming Hunter College

A Brief Introduction to Unix

Transcription:

Name : Roll No. :... Invigilator's Signature :. CS/BCA/SEM-5/BCA-502/2011-12 2011 UNIX AND SHELL PROGRAMMING Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are required to give their answers in their own words as far as practicable. GROUP A ( Multiple Choice Type Questions ) 1. Choose the correct alternatives for any ten of the following : i) Sort n emp a) sort by primary key b) numeric sorting c) sort by secondary key d) none of these. 10 1 = 10 ii) $$ represents a) number of arguments specified in command line b) name of the executed command c) exit status of the last command d) PID of the current shell. 5119 [ Turn over

iii) How would you check that two numbers are equal? a) test $a eq $b b) test $a = $b c) test $a == $b d) none of these. iv) The startup file for vi editor is a).profile b).login c).startup d) none of these. v) The command pr d formats input vi) a) can be numbered b) is double spaced c) offset from the left d) none of these. If administrator wants to see the password of user, he will search for the file a) etc/shadow b) etc/password c) etc/null d) none of these. 5119 2

vii) The PID is generated by CS/BCA/SEM-5/BCA-502/2011-12 a) shell b) kernel c) both shell & kernel d) none of these. viii) Address relocation is done by a) NIS b) Linus administrator c) Linker d) none of these. ix) The state of the file system is contained in a) Inode block b) Boot block c) Super block d) Data block. x) To see the last access time of various files in a file system the command is a) 1s lu b) 1s l c) 1s lat d) 1s mt. 5119 3 [ Turn over

xi) Your shell script has a name 1s. If you execute 1s a) your script would get executed b) the 1s command would get executed c) whether script is executed or command is executed depends upon the value of PATH d) both 1s and the script would get executed one after another. xii) To copy a file "file l" to "file 2" which of the following commands will you use? a) cat file1 file 2 b) cat file 1 0>file2 c) cat 1> file2 0< file1 d) cat 2> file2 0<file1. GROUP B ( Short Answer Type Questions ) Answer any three of the following. 3 5 = 15 2. Differentiate between LILO and GRUB. 3. a) Write a single command in unix to do the following : 2 Output of who should be displayed on the screen with value of total number of users who have logged in displayed at the bottom of the list. b) Interpret the following command : 2 grep "^[^^]" filename c) Name the process whose pid is zero. 1 5119 4

4. a) Write a command line to count the number of times a specific character, say "?" appears in a given file. 2 b) What should be the output of the following shell script : x= [ n $x ] echo $? [ z $x ] echo $? 2 c) What does kill $! do? 1 5. a) What are block and character devices? 2 b) What are the different run levels in UNIX? 3 6. Explain UNIX file system briefly. GROUP C ( Long Answer Type Questions ) Answer any three of the following. 3 15 = 45 7. a) Draw a neat block diagram to represent the System Kernel and describe the functions of various modules in it. 6 b) What do you mean by physical and logical blocks? A unix file system has 0 5 kb block size with 32 bit address. The inode has 12 direct, one indirect, one double indirect and one triple indirect address. What is the maximum file size it can access? 2 + 4 c) Why is the memory copy of inode block and super block required? 3 5119 5 [ Turn over

8. a) What do you understand by PATH variable? How does the kernel access a file? 2 + 3 b) You tried to copy a file foo from another user's directory, but you got the error message "cannot create file foo". You have written permission in your own directory. What could be the reason and how do you copy the file? 2 + 2 c) Which file attributes change when you copy a file from another user account? 1 d) Use find to remove all the files which are modified one month before from the posix directory under your parent directory. 3 e) How is chown different from chgrp when it comes to renouncing ownership? 2 9. a) Write a shell script to check whether a string is palindrome or not. 5 b) Write a shell script to list all primes upto n. 5 c) Write a shell script to list all Armstrong numbers up to 1000. 5 10. a) What is unique command? Explain with example. 4 b) Arrange the data of a file in ascending and descending orders. 4 c) Write a shell script to check whether a file is readable, writeable or executable. 5 d) Explain the command to print all characters in a file. 2 5119 6

11. Write short notes on any three of the following : 3 5 a) Symbolic Link b) Mounting of file system c) Device files d) At and batch command e) IFS f) Sticky bit g) Standard input, standard output and standard error. 5119 7 [ Turn over