SlideShare una empresa de Scribd logo
1 de 7
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

Más contenido relacionado

La actualidad más candente (20)

Embedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernelEmbedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernel
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Operating system
Operating systemOperating system
Operating system
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
Operating systems unix
Operating systems   unixOperating systems   unix
Operating systems unix
 
Introduction to Operating Systems
Introduction to Operating SystemsIntroduction to Operating Systems
Introduction to Operating Systems
 
A practical guide to buildroot
A practical guide to buildrootA practical guide to buildroot
A practical guide to buildroot
 
Unix & Linux File System in Operating System
Unix & Linux File System in Operating SystemUnix & Linux File System in Operating System
Unix & Linux File System in Operating System
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating System
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
OS Memory Management
OS Memory ManagementOS Memory Management
OS Memory Management
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Know the UNIX Commands
Know the UNIX CommandsKnow the UNIX Commands
Know the UNIX Commands
 
Introduction To Makefile
Introduction To MakefileIntroduction To Makefile
Introduction To Makefile
 
Unix notes
Unix notesUnix notes
Unix notes
 
linux device driver
linux device driverlinux device driver
linux device driver
 
Linux notes
Linux notesLinux notes
Linux notes
 
Linux Internals - Interview essentials - 1.0
Linux Internals - Interview essentials - 1.0Linux Internals - Interview essentials - 1.0
Linux Internals - Interview essentials - 1.0
 
Unix ppt
Unix pptUnix ppt
Unix ppt
 

Destacado

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 coHuyen Trang Nu
 
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 ResourcesMaryrose 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 strategiesMaryrose 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 AdblockingPageFair
 

Destacado (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 a Assignment unix & shell programming

Linux admin interview questions
Linux admin interview questionsLinux admin interview questions
Linux admin interview questionsKavya Sri
 
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.pdfshaktisaini8
 
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 newKatherineJack1
 
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 newEmmaJack2018
 
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 newlizabonilla
 
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 newsarahlazeto
 
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 newLillieDickey
 
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 newmarysherman2018
 
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 newsweetsour2017
 
Operating System Multiple Choice Questions
Operating System Multiple Choice QuestionsOperating System Multiple Choice Questions
Operating System Multiple Choice QuestionsShusil Baral
 
Anhnh osg202-1
Anhnh osg202-1Anhnh osg202-1
Anhnh osg202-1QuynBiVn1
 
Qbjective question linux
Qbjective question linuxQbjective question linux
Qbjective question linuxAmit Rathore
 
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.comBartholomew59
 

Similar a 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
 
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
 
os.ppt
os.pptos.ppt
os.ppt
 

Último

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Último (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

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