0% found this document useful (0 votes)
38 views6 pages

Linux QB Final

Uploaded by

2222jb23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views6 pages

Linux QB Final

Uploaded by

2222jb23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

Linux and Shell Programming – Question Bank

UNIT - I
---------
SECTION - A
---------------
1.The system calls in UNIX is written using _______ Language. (CO1 - K1)
(a) C (b) C++ (c) Fortran (d) Assembly Language
2.Identify the command which is used to remove files. (CO1 - K1)
(a) delete (b) rm (c) dm (d) erase
3.Which command is used to dispaly the Linux version? (CO1 - K1)
(a) uname -r (b) uname -n (c) uname -t (d) kernel
4.Identify the command which is used to remove empty directories. (CO1 - K1)
(a) rd (b) remove (c) rmdir (d)rdir
5.In which of the following directory does the configuration files are present? (CO1 - K1)
(a) /bin (b) /root (c) /dev (d) /etc
6.What is the core of the Linux Operating system? (CO1 - K1)
(a) Terminal (b) Kernal (c) Command (d) Directory
7.Which of the following sign is used to represent the user home directory?(CO1 - K1)
(a) / (b) ~ (c) . (d) ..
8.An______ is a program that acts as an interface between users and computer. (CO1 - K1)
A.System Software B. Operating System C. Process D. Application Software
9.In which year does linux kernel combined with GNU system as free os called linux.(CO1 - K1)
a) 1991 b)1992 c)1929 d)1984
10.____ command is used to display the specific number of files from the end of the file. (CO1 -
K1)
A.Head B. Tail C. More D. Less

SECTION - B
---------------
1.Write a short note on the functions of Operating System. (CO1-K1)
2.Explain the types of operating systems briefly. (CO1-K2)
3.Describe the advantages & features of Linux. (CO1-K2)
4.Explain the uses of Linux operating systems. (CO1-K1)
5.List out the types of Shells available in Linux and explain it. (CO1-K2)
6.Discuss the pros and cons of Linux Bash. (CO1-K4)
7.Distinguish between Unix and Linux. (CO1-K4)
8.List out the basic commands of Linux and explain it. (CO1-K2)

SECTION - C
---------------
1.Describe Linux Architecture in detail. (CO1-K1)
2.How does Linux works? Explain. (CO1-K2)
3.Write a short note on the history of Linux. (CO1-K1)
4.Briefly explain the shell variables.(CO1-K1)
5.Explain the steps involved in creating a Shell script. (CO1-K1)
6.Elaborate on Linux Distributions. (CO1-K2)
7.Distinguish between Linux and Windows. (CO1-K4)
8.Illustrate how to download and install Linux Ubuntu on a Windows PC. (CO1-K3)
UNIT - II
----------
SECTION - A
---------------
1.pwd command displays------------------. (CO2 - K1)
(a) user password (b) Password file content
(c) present working directory (d) None of the mentioned
2.Which among the following interacts directly to system hardware? (CO2 - K1)
(a) shell (b) commands (c) kernel (d) Applications
3.What is / root? (CO2 - K1)
(a) Root file system (b) Home directory of the root user
(c) Directories of the file system (d) None of the mentioned
4.How many links are created when we create a directory file? (CO2 - K1)
(a) 1 (b) 2 (c) 3 (d) 4
5.The most common file type is ------------------. (CO2 - K1)
(a) ordinary file (b) directory file (c) device file (d) ordinary file and directory file
6.The ___directory contains information specific to different utilities availabel in linux. (CO2-K2)
a) /bin b)/etc c)/user d)/var
7.The directory file have ____. (CO2-K1)
A) File names & File location B) File names & Inode Numbers C) File names & Permissions D)
File names & Address
8.We can use the _____command to display the contents of a file one screen at a time. (CO2-K2)
a)less b) more c)split d)forward
9.Kernal is ____ of Linux operating system. (CO2-K2)
A) core B) Shell C) Terminal D) Command
10.Which of the following command output contains userid? (CO2-K3)
A) ls B) help C) date D) ls –l
SECTION - B
---------------
1.Why should we use multiple expressions in chmod? Explain with an example. (CO2 - K1)
2.Explain some most commonly used features of bash shell with their functions. (CO2 - K2)
3.Summarize the file types in Linux? Discuss file operations with examples. (CO2 - K2)
4.Illustrate the Head and Tail commands with examples. (CO2-K3)
5.Explain about pwd and cd command with syntax and examples. (CO2 - K2)
6.Infer how will your create and delete file and directories in Linux. (CO2 - K2)
7.Describe the ls command with example. (CO2 - K2)
8.Write a shell script to get the current date, time, username and current working directory. (CO2-
K2)

SECTION - C
---------------
1.Describe the following. (CO2 - K2)
(i) Changing the working directory
(ii) Removing a directory
2.Explain briefly about all the file commands in Linux Operating System. (CO2 - K2)
3.Describe in detail about archiving and compressing fles in LINUX. (CO2 - K2)
4.Write a brief note on i) Types of Files in Linux ii) Types of Users in Linux. (CO2-K2)
5.Explain about Moving and Renaming files in Linux. (CO2-K3)
6.Explain the Linux file system and directories in detail. (CO2-K2)
7.Write a short note on i) File Naming Conventions in Linux ii) Related Path Names. (CO2-K2)
8.How can we pass arguments to a script in linux?. How to access these arguments from within the
script? (CO2-K2)

UNIT - III
-----------
SECTION - A
---------------
1.Which one of the following statement is not true? (CO3 - K1)
(a) vim editor is the improved version of vi editor
(b) vi editor commands are not case sensitive.
(c) vi editor has two modes of operation : command and insert mode
(d) vi stands for visual editor
2.Which vi editor commmand copies the current line of the file? (CO3 - K1)
(a) yy (b) yw (c) yc (d) None of the mentioned
3.Which command is used to close the Vi editor? (CO3 - K1)
(a) q (b) wq (c) Both (a) and (b) (d) None of the mentioned
4.Which command shows all the abbreviations of editor? (CO3 - K1)
(a) ab (b) abb (c) show (d) None of the mentioned
5.By default how many lines are displayed using the head command? (CO3 - K1)
(a) 5 (b) 10 (c) 4 (d) 20
6.Which commands reads user input from the terminal and assign the value to a variable name?
(CO3 - K1)
(a) read (b) get (c) declare (d) set
7.What command is used to copy files and directories? (CO3-K1)
A.copy B.cpy C.rn D.cp
8.Which command for Quits without changes from vi editor?(CO3-K1)
A.:wq B.:w C.:q! D.:w!
9.To specify the operations that need to be performed on the files ___ option is used. (CO3-K1)
a.-type b.-name c.-ed d.-exec
10.To display the specified number of lines from the beginning of file _____ command is used.
(CO3-K1)
a.tail b.cat c.head d.r

SECTION - B
---------------
1.Write a short note on Vi editor. (CO3-K2)
2.Narrate the navigation commands in Vi Editor with examples. (CO3 - K3)
3.Experiment the different modes in Vi editor. (CO3 - K3)
4.Build different types of users available in Linux System. (CO3 - K3)
5.Identify all the filters with appropriate examples. (CO3 - K3)
6.Narrate about pipes with suitable examples. (CO3 - K3)
7.Critique the concept of Pipes in Shell Script. (CO3-K5)
8.Explain the use of echo statement and how insert comments in shell script? (CO3-K2)

SECTION - C
---------------
1.Describe about Standard Files. (CO3-K3)
2.Define Redirection. Explain about types of Redirction with a suitable example. (CO3-K3)
3.Discuss about Pipes with sutiable example. (CO3-K3)
4.Describe about Loading files in linux. (CO3-K3)
5.Explain in detail about various filters in shell script with appropriate examples. (CO3 - K2)
6.Explain briefly about tee command with examples. (CO3 - K2)
7.Critique the various environmental variables used in bash shell. (CO3-K2)
8.Write a Shell Script to find the sum of two integer numbers. (CO3-K6)

UNIT - IV
-------------
SECTION - A
-----------------
1.A filename is not accepted as an argument by which command? (CO4 - K1)
(a) mailx (b) ls (c) paste (d) cut
2.For reading data from the same file containing the script ______ allows us. (CO4 - K1)
(a) >> (b) !! (c) - (d) <<
3.The shift arguments leftwe we use ______ statement. (CO4 - K1)
(a) set (b) shift (c) cut (d) paste
4.We have to make it executable first by using ______ to run a script. (CO4 - K1)
(a) chmod + w (b) chmod + x (c) chmod + r (d) chmod + rwx
5.Like chmod,chownand chgrp can also use _______ group. (CO4 - K1)
(a) -R (b) -r (c) -x (d) -i
6.Which command is used to check file system usage in a system? (CO4 - K1)
(a) mount (b) df (c) du (d) dd
7.Which of the following commands can be used to copy files across systems? (CO4 - K1)
(a) ssh (b) telnet (c) rsh (d) ftp
8.The 'logout' built in command is used to _____. (CO4 - K1)
(a) shutdown the computer (b) logoff of the computre
(c) logout the current user (d) to exit the current shell
9.Which command puts a script to sleep signal is received? (CO4 - K1)
(a) sleep (b) suspend (c) disown (d) break
10.Which command is used to set limits on file size? (CO4 - K1)
(a) fsize (b) flimit (c) ulimit (d) usize
11.The permission -rwxr-sr- represented in octal expression will be _____. (CO4 - K1)
(a) 0777 (b) 2766 (c) 2744 (d) 2754

SECTION - B
---------------
1.Discuss the file access permissions and explain. (CO4 - K4)
2.Determine how to manage and locate files in Linux. (CO4 - K4)
3.Discuss user and group in Linux? Explain. (CO4 - K4)
4.Categorize the different ways of setting the file access permissions. (CO4 - K4)
5.Explain about Linux special variables with example. (CO4 - K3)
6.Determine how you will secure files in Linux. (CO4 - K4)
7.Write about local and global shell variables. (CO4-K3)

SECTION - C
---------------
1.Elucidate the Global Shell variables? Explain its advantages and disadvantages. (CO4 - K4)
2.Explain changing files /directory permission with 'chmod' command. (CO4-K3)
3.How to secure files in linux? Explain. (CO4-K3)
4.Write a linux shell program to print the multiplication table. (CO4 - K3)
5.Discuss the syntax for case…esac in linux. (CO4-K2)
6.Explain about various environmental variables used in bash shell. (CO4 - K3)
7.Describe command line arguments in Linux. (CO4-K3)
UNIT - V
------------

SECTION - A
------------------
1.Which of the following statement in supported in Linux shell? (CO5 - K1)
(a) case (b) swith (c) switch..case (d) case...esac
2.The shell script is ____. (CO5 - K2)
(a)File containing a series of commands
(b)File containing special symbols
(c)Group of commands
(d)Group of functions
3.The next statement _____. (CO5 - K2)
(a) immediately stops processing the current record
(b) go to the next record
(c) immediately stops processing the next record
(d)None of the mentioned
4.The break statement ____. (CO5 - K2)
(a) jumps out of the innermost for loop
(b) jumps out of the innermost while loop
(c) jumps out of the innermost do..while loop
(d) all of the mentioned
5.Which statement skips over the rest of the body, causing the next cycle around the loop begin
immediately? (CO5 - K2)
(a) continue (b) break (c) next (d) None of the mentioned
6.___returns true if the string to be tested is null. (CO5-K3)
a)-z b)-n c)-c d)-a
7.___specifies the nth enclosing loop to continue. (CO5-K3)
a)continue with nth b)continue n c)continue d)break

SECTION - B
---------------
1.Formulate about while and until loop. (CO5 - K5)
2.Prepare a note on conditional execution. (CO5 - K5)
3.Construct a shell script to count number of lines present in a text file. (CO5 - K5)
4.Propose how continue command is used in Linux shell script. (CO5 - K5)
5.Develop a note on iteration using shell script. (CO5 - K5)
6.How do you terminate a shell script in If statement? Explain. (CO5-K4)
7.Write down the syntax of "for" loop and explain it. (CO5-K6)
8.Construct a suitable example discuss about case...esac construct in shell script. (CO5 - K5)

SECTION - C
---------------
1.Explain conditional statements in Linux. (CO5-K2)
2.Illustrate the nesting loop in Linux with example. (CO5-K3)
3.Formulate about break and continue statement in Linux with example. (CO5 - K5)
4.Prepare a shell script to get the current date, time and current working directory. (CO5 - K5)
5.Design a shell script to accept a string in command line and reverse it. (CO5 - K5)
6.How can pass arguments to a script in Linux? And how to access these arguments from within the
script? (CO5-K4)
7.Write a Shell script to validate password strength. Here are a few assumptions for the password
string. (a) Length – minimum of 8 characters. (b) Contain both alphabet and number. (c) Include
both the small and capital case letters. If the password doesn‘t comply to any of the above
conditions, then the script should report it as a <Weak Password>. (CO5-K6)
8.Write a Shell script to print a number in reverse order. It should support the following
requirements. (a) The script should accept the input from the command line. (b) If you don‘t input
any data, then display an error message to execute the script correctly. (CO5-K6)

You might also like