SlideShare a Scribd company logo
AMITY SCHOOL OF DISTANCE LEARNING
Post Box No. 503, Sector-44
Noida – 201303
Unix & Shell programming
(MCA)
Assignment A
Marks 10
Answer all questions.
1. Discuss the features of UNIX operating system that have made them such
phenomenally successful Operating systems.
2. What is shell programming? Write a shell program to print all the contents of an existing text
file in upper case
3. Describe what the grep command does? Illustrate its use with an original
example.
4. Write a shell program to generate the first “n” terms of the following sequence without using
multiplication.
1 2 4 8 16 32………
5. What are filters? Give some examples of commands that can be used as filters
Unix & Shell programming
(MCA)
Assignment B
Marks 10
Answer all questions.
1. What are the different kinds of file systems available to UNIX operating system.
2. Write shell programs for the following:
i. To find second largest number among the 5 numbers given.
ii. To find sum of all the alternate digits in a given 7 digit number.
iii. To count number of vowels in a given string.
iv. To take 2 strings as input, concatenate them and display the length of the resultant
string.
v. To display the reverse of a given number.
3. Write the UNIX commands for the following
i) To display the sizes and names of the six largest files in /bin, listed in descending
order of their size.
ii) To display the number of words in the last 250 lines of any file.
iii) To display the name of the oldest file (and only the oldest file) in the current working
directory.
iv) To show the number of all files and directories (including hidden ones, but not. or.) in
the directory /bin.
v) Use the ps command, and the grep command, in a pipeline to find all the processes
owned by you.
4. Read the case description given below and answer the question contained
CASE STUDY
What is an i-node and what information is contained in it? Describe how named files are mapped
to i-nodes. How is the information associating disc blocks with i-nodes represented? What
restrictions are placed on name to i-node links to simplify file system recovery?
Unix & Shell programming
(MCA)
Assignment C
Marks 10
Answer all questions.
1. UNIX uses ls to list files in a directory. The corresponding command in MS
environment is--
a) lf
b) list
c) c dir
d) None of above
2. A file with extension .txt--
a) Is a text file created using vi editor
b) Is a text file created using a notepad
c) Is a text file created using word
d) a) & b) above
3. What is POSIX?
a) A standard operating system interface and environment.
b) A version of the UNIX operating system.
c) A portable platform for Java programming.
d) A subsystem of Windows NT, 2000 and XP that isolates the Executive from
platform-specific hardware differences
4. Which of the following files in the current directory are identified by the regular
expression a?b*.
a) afile
b) aab
c) abb
d) abc
e) axbb
f) f. abxy
5. For some file the access permissions are modified to 764. Which of the following
interpretation are valid?
a) Every one can read, group can execute only and the owner can read and write.
b) Every one can read and write, but owner alone can execute.
c) Every one can read, group including owner can write, owner alone can execute
d) None of above
6. The file’s properties in Windows environment include which amongst the following?
a) File owners’ name
b) File size
c) The date of last modification
d) Date of file creation
e) The folder where it is located
7. Which of the following information is contained in inode structure?
a) The file size
b) The name of the owner of the file
c) The access permissions for the file
d) All the dates of modification since the file’s creation
e) The number of symbolic links for this file
8. What are utilities?
a) Peripherals that are connected to a computer.
b) Operating system routines that execute in supervisor mode.
c) Data structures that are part of the kernel of an operating system.
d) Shells, compilers and other useful system programs.
9. Which directory under the root contains the information on devices?
a) /usr/bin
b) /usr/sbin
c) /usr/peripherals/dev
d) /etc/dev
10. What is the command ‘mv’ used for in Unix?
a) To display the files in current directory
b) To rename a file
c) To move to a different directory
d) To open a file in the Main Viewer
e) e. None of the Above
11. What is the result of typing the command pwd?
a) It allows you to change the password
b) It allows you to enter your password to log in
c) It will display the name of your computer
d) It will show your current location in the file system
e) It will display a list of Protected Web Documents
12. Which unix command will display all files starting with an a?
a) mv a*
b) cd
c) ls
d) ls a*
e) ls *a
f) ls a
13. Unix Operating System is--
a) Time Sharing Operating System
b) Multi-User Operating System
c) Multi-tasking Operating System
d) All the Above
14. The program is known as _________ that interacts with the inner part of called kernel.
a) Compiler
b) Device Driver
c) Protocol
d) Shell
15. Identify the odd thing in the services of operating system--
a) Accounting
b) Protection
c) Error detection and correction
d) None of above
16. Dead lock handling in ______ OS, the response time is very critical.
a) Multitasking
b) Batch
c) Online
d) Real-time
17. Software is a program that directs the overall operation of the computer facilitates its use and
interacts with the user. What are the different types of such software?
a) Operating system
b) Language Compiler
c) Utilities
d) All of the above
18. PCB stands for--
a) Program Control Block
b) Process Control Block
c) Process Communication Block
d) None of the above
19. The primary job of the operating system of a computer is to--
a) Command Resources
b) Manage Resources
c) Provide Utilities
d) Be user friendly
20. Super computers typically employ--
a) Real time Operating system
b) Multiprocessors OS
c) Desktop OS
d) None of the above
21. Which one of the following statements correctly describes the relationship between the
processes and programs in a computer system at any given moment?
a) Every program stored in secondary memory must be associated with a process.
b) A different program must be associated with every process.
c) Several programs may be associated with the same process.
d) Several processes may be associated with the same program.
22. Multiprogramming systems --
a) Are easier to develop than single programming systems
b) Execute each job faster
c) Execute more jobs in the same time
d) Are used only on large main frame computers
23. Multiprocessing--
a) Make the operating system simpler
b) Allows multiple processes to run simultaneously
c) Is completely understood by all major computer vendors
d) Allows the same computer to have the multiple processors
24. Which is not the state of the process?
a) Blocked
b) Running
c) Ready
d) Privileged
25. The operating system of a computer serves as a software interface between the user and the-
a) Hardware
b) Peripheral
c) Memory
d) Screen
26. A process is--
a) Program in execution
b) A concurrent program
c) Any sequential program
d) Something Which Prevents Deadlock
27. The kernel of the operating system remains in the primary memory because--
a) It is mostly called (used)
b) It manages all interrupt calls
c) It controls all operations in process
d) It is low level
28. Which of the following statement is not true?
a) Multiprogramming implies multitasking
b) Multi-user does not imply multiprocessing
c) Multitasking does not imply multiprocessing
d) Multithreading implies multi-user
29. The term “Operating System " means--
a) A set of programs which controls computer working
b) The way a computer operator works
c) Conversion of high-level language in to machine level language
d) The way a floppy disk drive operates
30. What is a shell?
a) It is a hardware component
b) It is a command interpreter
c) It is a part in compiler
d) It is a tool in CPU scheduling
31. The operating system manages--
a) Memory
b) Processor
c) Disk and I/O devices
d) All of the above
32. chown means--
a) Changes the mode of operation to kernel mode
b) Creates a thread
c) Changes the users and/or group ownership of each given file
d) Creates a child process
33. The process which terminates before the parent process exits, is called as--
a) Zombie
b) Orphan
c) Child
d) None of above
34. Identify the point(s) that is not true w.r.t. signals--
a) Signals are software generated interrupts that are sent to a process when an
event happens
b) Signal delivery is analogous to hardware interrupts in that a signal can be
blocked from being delivered in the future.
c) Most signals are synchronous by nature.
d) Most signal cause termination of the receiving process if no action is taken by the
process in response to the signal
35. ---------Works as a command interpretor.
a) Hardware
b) Kernal
c) Shell
d) CPU
36. An important task that the operating system performs is____, which keeps track of the files
stored on a PC so that they can be retrieved when needed.
a) File management
b) File listing
c) File recovery
d) Disk management
37. The means by which an operating system or any other program interacts with the user is
called--
a) user login
b) program front-end
c) user interface
d) programming interface
38. ---------- was originally developed at AT&T Bell Labs as an operating system
a) Linux
b) Solaris
c) Mac OS X
d) UNIX
39. For multiprogramming systems, most UNIX operating systems use--
a) Swapping
b) Demand paging
c) Either (a) or (b)
d) Neither (a) nor (b)
40. What are the tasks of an Operating System?
a) To manage all hardware and software resources
b) To Allow creation of documents, images and music
c) To provide a user interface
d) All of the above
e) A and c only
f) B and c only

More Related Content

What's hot

Linux device drivers
Linux device drivers Linux device drivers
Operating systems By Awais
Operating systems By AwaisOperating systems By Awais
Operating systems By Awais
Awaisch3
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationJafar Nesargi
 
Windows Vista
Windows VistaWindows Vista
Windows Vista
guestd893cef2
 
Mca ii os u-1 introduction to os
Mca  ii  os u-1 introduction to osMca  ii  os u-1 introduction to os
Mca ii os u-1 introduction to os
Rai University
 
Android crash debugging
Android crash debuggingAndroid crash debugging
Android crash debugging
Ashish Agrawal
 
Operating Systems - File Management
Operating Systems -  File ManagementOperating Systems -  File Management
Operating Systems - File Management
Damian T. Gordon
 
Ch 01-types-and-components-of-computers
Ch 01-types-and-components-of-computersCh 01-types-and-components-of-computers
Ch 01-types-and-components-of-computers
mmoussa83
 
Bootloaders
BootloadersBootloaders
Bootloaders
Anil Kumar Pugalia
 
Basics of boot-loader
Basics of boot-loaderBasics of boot-loader
Basics of boot-loader
iamumr
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
Emertxe Information Technologies Pvt Ltd
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
Presentation on linux
Presentation on linuxPresentation on linux
Presentation on linux
Veeral Bhateja
 
Windows File Systems
Windows File SystemsWindows File Systems
Windows File Systems
primeteacher32
 
Operating system
Operating systemOperating system
Operating system
vivek anand
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
Anil Kumar Pugalia
 
Linux os and its features
Linux os and its featuresLinux os and its features
Linux os and its features
Kadiresan Nagarattiname
 
Storage Management
Storage ManagementStorage Management
Storage Management
SURBHI SAROHA
 
File System FAT And NTFS
File System FAT And NTFSFile System FAT And NTFS
File System FAT And NTFS
Inocentshuja Ahmad
 

What's hot (20)

Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Operating systems By Awais
Operating systems By AwaisOperating systems By Awais
Operating systems By Awais
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
 
Case study linux
Case study linuxCase study linux
Case study linux
 
Windows Vista
Windows VistaWindows Vista
Windows Vista
 
Mca ii os u-1 introduction to os
Mca  ii  os u-1 introduction to osMca  ii  os u-1 introduction to os
Mca ii os u-1 introduction to os
 
Android crash debugging
Android crash debuggingAndroid crash debugging
Android crash debugging
 
Operating Systems - File Management
Operating Systems -  File ManagementOperating Systems -  File Management
Operating Systems - File Management
 
Ch 01-types-and-components-of-computers
Ch 01-types-and-components-of-computersCh 01-types-and-components-of-computers
Ch 01-types-and-components-of-computers
 
Bootloaders
BootloadersBootloaders
Bootloaders
 
Basics of boot-loader
Basics of boot-loaderBasics of boot-loader
Basics of boot-loader
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Presentation on linux
Presentation on linuxPresentation on linux
Presentation on linux
 
Windows File Systems
Windows File SystemsWindows File Systems
Windows File Systems
 
Operating system
Operating systemOperating system
Operating system
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
Linux os and its features
Linux os and its featuresLinux os and its features
Linux os and its features
 
Storage Management
Storage ManagementStorage Management
Storage Management
 
File System FAT And NTFS
File System FAT And NTFSFile System FAT And NTFS
File System FAT And NTFS
 

Viewers also liked

Bai tap trac nghiem dao dong co
Bai tap trac nghiem dao dong coBai tap trac nghiem dao dong co
Bai tap trac nghiem dao dong co
Huyen Trang Nu
 
Hajj - Journey of Life Time
Hajj - Journey of Life TimeHajj - Journey of Life Time
Hajj - Journey of Life Time
Khawaja Umer Farooq Uddin
 
2012 Youth, Media Consumption and Convergence
2012 Youth, Media Consumption and Convergence2012 Youth, Media Consumption and Convergence
2012 Youth, Media Consumption and ConvergenceRede Brasil Conectado
 
New Roles of Human Resources
New Roles of Human ResourcesNew Roles of Human Resources
New Roles of Human Resources
Maryrose Amparo
 
Malcolm Knowles
Malcolm KnowlesMalcolm Knowles
Malcolm Knowlescasimmons
 
Product Mix - decisions and strategies
Product Mix - decisions and strategiesProduct Mix - decisions and strategies
Product Mix - decisions and strategies
Maryrose Amparo
 
2015 Ad Blocking Report - The Cost of Adblocking
2015 Ad Blocking Report - The Cost of Adblocking2015 Ad Blocking Report - The Cost of Adblocking
2015 Ad Blocking Report - The Cost of Adblocking
PageFair
 

Viewers also liked (8)

Bai tap trac nghiem dao dong co
Bai tap trac nghiem dao dong coBai tap trac nghiem dao dong co
Bai tap trac nghiem dao dong co
 
Important Messege from Holy Quran
Important Messege from Holy QuranImportant Messege from Holy Quran
Important Messege from Holy Quran
 
Hajj - Journey of Life Time
Hajj - Journey of Life TimeHajj - Journey of Life Time
Hajj - Journey of Life Time
 
2012 Youth, Media Consumption and Convergence
2012 Youth, Media Consumption and Convergence2012 Youth, Media Consumption and Convergence
2012 Youth, Media Consumption and Convergence
 
New Roles of Human Resources
New Roles of Human ResourcesNew Roles of Human Resources
New Roles of Human Resources
 
Malcolm Knowles
Malcolm KnowlesMalcolm Knowles
Malcolm Knowles
 
Product Mix - decisions and strategies
Product Mix - decisions and strategiesProduct Mix - decisions and strategies
Product Mix - decisions and strategies
 
2015 Ad Blocking Report - The Cost of Adblocking
2015 Ad Blocking Report - The Cost of Adblocking2015 Ad Blocking Report - The Cost of Adblocking
2015 Ad Blocking Report - The Cost of Adblocking
 

Similar to Assignment unix & shell programming

Linux admin interview questions
Linux admin interview questionsLinux admin interview questions
Linux admin interview questionsKavya Sri
 
Operating system quiz
Operating system quizOperating system quiz
Operating system quiz
Rajandeep Gill
 
FreeBSD operating system Concept for BCA
FreeBSD operating system Concept for BCAFreeBSD operating system Concept for BCA
FreeBSD operating system Concept for BCA
Devipriya309248
 
Which of the following files are stored in the -bin directory in Linux.pdf
Which of the following files are stored in the -bin directory in Linux.pdfWhich of the following files are stored in the -bin directory in Linux.pdf
Which of the following files are stored in the -bin directory in Linux.pdf
shaktisaini8
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
KatherineJack1
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
EmmaJack2018
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
lizabonilla
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
sarahlazeto
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
LillieDickey
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
marysherman2018
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
sweetsour2017
 
Operating System Multiple Choice Questions
Operating System Multiple Choice QuestionsOperating System Multiple Choice Questions
Operating System Multiple Choice Questions
Shusil Baral
 
Anhnh osg202-1
Anhnh osg202-1Anhnh osg202-1
Anhnh osg202-1
QuynBiVn1
 
Qbjective question linux
Qbjective question linuxQbjective question linux
Qbjective question linux
Amit Rathore
 
test questions
test questionstest questions
test questions
Ganesh Bhosale
 
Galvin-operating System(Free bsd)
Galvin-operating System(Free bsd)Galvin-operating System(Free bsd)
Galvin-operating System(Free bsd)dsuyal1
 
POS 433 Effective Communication - tutorialrank.com
POS 433 Effective Communication - tutorialrank.comPOS 433 Effective Communication - tutorialrank.com
POS 433 Effective Communication - tutorialrank.com
Bartholomew59
 

Similar to Assignment unix & shell programming (20)

Linux admin interview questions
Linux admin interview questionsLinux admin interview questions
Linux admin interview questions
 
Unix1
Unix1Unix1
Unix1
 
RTOS.docx
RTOS.docxRTOS.docx
RTOS.docx
 
Operating system quiz
Operating system quizOperating system quiz
Operating system quiz
 
FreeBSD operating system Concept for BCA
FreeBSD operating system Concept for BCAFreeBSD operating system Concept for BCA
FreeBSD operating system Concept for BCA
 
Which of the following files are stored in the -bin directory in Linux.pdf
Which of the following files are stored in the -bin directory in Linux.pdfWhich of the following files are stored in the -bin directory in Linux.pdf
Which of the following files are stored in the -bin directory in Linux.pdf
 
App A
App AApp A
App A
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
 
Cis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer newCis 562 week 11 final exam – strayer new
Cis 562 week 11 final exam – strayer new
 
Operating System Multiple Choice Questions
Operating System Multiple Choice QuestionsOperating System Multiple Choice Questions
Operating System Multiple Choice Questions
 
Anhnh osg202-1
Anhnh osg202-1Anhnh osg202-1
Anhnh osg202-1
 
Qbjective question linux
Qbjective question linuxQbjective question linux
Qbjective question linux
 
test questions
test questionstest questions
test questions
 
Galvin-operating System(Free bsd)
Galvin-operating System(Free bsd)Galvin-operating System(Free bsd)
Galvin-operating System(Free bsd)
 
POS 433 Effective Communication - tutorialrank.com
POS 433 Effective Communication - tutorialrank.comPOS 433 Effective Communication - tutorialrank.com
POS 433 Effective Communication - tutorialrank.com
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 

Assignment unix & shell programming

  • 1. AMITY SCHOOL OF DISTANCE LEARNING Post Box No. 503, Sector-44 Noida – 201303 Unix & Shell programming (MCA) Assignment A Marks 10 Answer all questions. 1. Discuss the features of UNIX operating system that have made them such phenomenally successful Operating systems. 2. What is shell programming? Write a shell program to print all the contents of an existing text file in upper case 3. Describe what the grep command does? Illustrate its use with an original example. 4. Write a shell program to generate the first “n” terms of the following sequence without using multiplication. 1 2 4 8 16 32……… 5. What are filters? Give some examples of commands that can be used as filters Unix & Shell programming (MCA) Assignment B Marks 10 Answer all questions. 1. What are the different kinds of file systems available to UNIX operating system. 2. Write shell programs for the following: i. To find second largest number among the 5 numbers given. ii. To find sum of all the alternate digits in a given 7 digit number. iii. To count number of vowels in a given string. iv. To take 2 strings as input, concatenate them and display the length of the resultant string. v. To display the reverse of a given number. 3. Write the UNIX commands for the following i) To display the sizes and names of the six largest files in /bin, listed in descending order of their size. ii) To display the number of words in the last 250 lines of any file. iii) To display the name of the oldest file (and only the oldest file) in the current working directory. iv) To show the number of all files and directories (including hidden ones, but not. or.) in the directory /bin. v) Use the ps command, and the grep command, in a pipeline to find all the processes owned by you. 4. Read the case description given below and answer the question contained CASE STUDY
  • 2. What is an i-node and what information is contained in it? Describe how named files are mapped to i-nodes. How is the information associating disc blocks with i-nodes represented? What restrictions are placed on name to i-node links to simplify file system recovery? Unix & Shell programming (MCA) Assignment C Marks 10 Answer all questions. 1. UNIX uses ls to list files in a directory. The corresponding command in MS environment is-- a) lf b) list c) c dir d) None of above 2. A file with extension .txt-- a) Is a text file created using vi editor b) Is a text file created using a notepad c) Is a text file created using word d) a) & b) above 3. What is POSIX? a) A standard operating system interface and environment. b) A version of the UNIX operating system. c) A portable platform for Java programming. d) A subsystem of Windows NT, 2000 and XP that isolates the Executive from platform-specific hardware differences 4. Which of the following files in the current directory are identified by the regular expression a?b*. a) afile b) aab c) abb d) abc e) axbb f) f. abxy 5. For some file the access permissions are modified to 764. Which of the following interpretation are valid? a) Every one can read, group can execute only and the owner can read and write. b) Every one can read and write, but owner alone can execute. c) Every one can read, group including owner can write, owner alone can execute d) None of above 6. The file’s properties in Windows environment include which amongst the following? a) File owners’ name b) File size c) The date of last modification d) Date of file creation
  • 3. e) The folder where it is located 7. Which of the following information is contained in inode structure? a) The file size b) The name of the owner of the file c) The access permissions for the file d) All the dates of modification since the file’s creation e) The number of symbolic links for this file 8. What are utilities? a) Peripherals that are connected to a computer. b) Operating system routines that execute in supervisor mode. c) Data structures that are part of the kernel of an operating system. d) Shells, compilers and other useful system programs. 9. Which directory under the root contains the information on devices? a) /usr/bin b) /usr/sbin c) /usr/peripherals/dev d) /etc/dev 10. What is the command ‘mv’ used for in Unix? a) To display the files in current directory b) To rename a file c) To move to a different directory d) To open a file in the Main Viewer e) e. None of the Above 11. What is the result of typing the command pwd? a) It allows you to change the password b) It allows you to enter your password to log in c) It will display the name of your computer d) It will show your current location in the file system e) It will display a list of Protected Web Documents 12. Which unix command will display all files starting with an a? a) mv a* b) cd c) ls d) ls a* e) ls *a f) ls a 13. Unix Operating System is-- a) Time Sharing Operating System b) Multi-User Operating System c) Multi-tasking Operating System d) All the Above 14. The program is known as _________ that interacts with the inner part of called kernel.
  • 4. a) Compiler b) Device Driver c) Protocol d) Shell 15. Identify the odd thing in the services of operating system-- a) Accounting b) Protection c) Error detection and correction d) None of above 16. Dead lock handling in ______ OS, the response time is very critical. a) Multitasking b) Batch c) Online d) Real-time 17. Software is a program that directs the overall operation of the computer facilitates its use and interacts with the user. What are the different types of such software? a) Operating system b) Language Compiler c) Utilities d) All of the above 18. PCB stands for-- a) Program Control Block b) Process Control Block c) Process Communication Block d) None of the above 19. The primary job of the operating system of a computer is to-- a) Command Resources b) Manage Resources c) Provide Utilities d) Be user friendly 20. Super computers typically employ-- a) Real time Operating system b) Multiprocessors OS c) Desktop OS d) None of the above 21. Which one of the following statements correctly describes the relationship between the processes and programs in a computer system at any given moment? a) Every program stored in secondary memory must be associated with a process. b) A different program must be associated with every process. c) Several programs may be associated with the same process. d) Several processes may be associated with the same program. 22. Multiprogramming systems -- a) Are easier to develop than single programming systems
  • 5. b) Execute each job faster c) Execute more jobs in the same time d) Are used only on large main frame computers 23. Multiprocessing-- a) Make the operating system simpler b) Allows multiple processes to run simultaneously c) Is completely understood by all major computer vendors d) Allows the same computer to have the multiple processors 24. Which is not the state of the process? a) Blocked b) Running c) Ready d) Privileged 25. The operating system of a computer serves as a software interface between the user and the- a) Hardware b) Peripheral c) Memory d) Screen 26. A process is-- a) Program in execution b) A concurrent program c) Any sequential program d) Something Which Prevents Deadlock 27. The kernel of the operating system remains in the primary memory because-- a) It is mostly called (used) b) It manages all interrupt calls c) It controls all operations in process d) It is low level 28. Which of the following statement is not true? a) Multiprogramming implies multitasking b) Multi-user does not imply multiprocessing c) Multitasking does not imply multiprocessing d) Multithreading implies multi-user 29. The term “Operating System " means-- a) A set of programs which controls computer working b) The way a computer operator works c) Conversion of high-level language in to machine level language d) The way a floppy disk drive operates 30. What is a shell? a) It is a hardware component b) It is a command interpreter c) It is a part in compiler d) It is a tool in CPU scheduling 31. The operating system manages-- a) Memory b) Processor
  • 6. c) Disk and I/O devices d) All of the above 32. chown means-- a) Changes the mode of operation to kernel mode b) Creates a thread c) Changes the users and/or group ownership of each given file d) Creates a child process 33. The process which terminates before the parent process exits, is called as-- a) Zombie b) Orphan c) Child d) None of above 34. Identify the point(s) that is not true w.r.t. signals-- a) Signals are software generated interrupts that are sent to a process when an event happens b) Signal delivery is analogous to hardware interrupts in that a signal can be blocked from being delivered in the future. c) Most signals are synchronous by nature. d) Most signal cause termination of the receiving process if no action is taken by the process in response to the signal 35. ---------Works as a command interpretor. a) Hardware b) Kernal c) Shell d) CPU 36. An important task that the operating system performs is____, which keeps track of the files stored on a PC so that they can be retrieved when needed. a) File management b) File listing c) File recovery d) Disk management 37. The means by which an operating system or any other program interacts with the user is called-- a) user login b) program front-end c) user interface d) programming interface 38. ---------- was originally developed at AT&T Bell Labs as an operating system a) Linux b) Solaris c) Mac OS X
  • 7. d) UNIX 39. For multiprogramming systems, most UNIX operating systems use-- a) Swapping b) Demand paging c) Either (a) or (b) d) Neither (a) nor (b) 40. What are the tasks of an Operating System? a) To manage all hardware and software resources b) To Allow creation of documents, images and music c) To provide a user interface d) All of the above e) A and c only f) B and c only