Linux Administration-B.C.A 18-21-First-Internal-Exam-FEB-2020


SAINTGITS COLLEGE OF APPLIED SCIENCES
          PATHAMUTTOM, KOTTAYAM

FIRST INTERNAL EXAMINATION, FEBRUARY 2020
Department of computer applications, Semester IV
Linux Administration
Total : 50 marks                                                         Time: 2 hours
Section A
Answer any 5 questions. Each question carries 2 marks.

1.    What is the use of echo?
echo command in linux is used to display line of text/string that are passed as an argument. This is a built in command that is mostly used in shell scripts and batch files to output status text to the screen or a file.
2.    Compare more and less command.
less” command is used to view files instead of opening the file. This post describes “less” command used in Linux along with usage. Usage: less [options] file_name. * Less is a program similar to more but which allows backward movement in the file as well as forward movement
3.    What is super block?
superblock is a record of the characteristics of a filesystem, including its size, the block size, the empty and the filled blocks and their respective counts, the size and location of the inode tables, the disk block map and usage information, and the size of the block groups.
4.    Give the syntax of case statement.
case word in
 pattern1)
      Statement(s) to be executed if pattern1 matches
      ;;
 pattern2)
      Statement(s) to be executed if pattern2 matches
      ;;
    pattern3)
      Statement(s) to be executed if pattern3 matches
      ;;
   *)
     Default condition to be executed
     ;;
  esac

5.    Define process in Linux
 Linux is a multiprocessing operating system. Processes are separate tasks each with their own rights and responsibilities. If one process crashes it will not cause another process in the system to crash.
6.    What is inode?
The inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block location(s) of the object's data.
Section B
Answer any 5 questions. Each question carries 5 marks.
7.    Explain different types of files in Linux.
·         Ordinary, Directories, Special, Pipe, Socket, Symbolic files (1.5)
·         Explanation of each Files (3.5)
8.    Explain cron scheduling commands
·         at – general format and explanation (2.5)
·         batch – general format and explanation (2.5)
9.    Explain Linux file system.
·         Boot block, Super block, node table, Data block (1.5)
·         Explanation and figure (3.5)
10.  Write a note on operators in Shell script.
·         Arithmetic, relational, Boolean, String, File Test(1.5)
·         Explanation and example(3.5)
11.  Explain commands for files and directories.
·         cd, ls, cp ,rm,mkdir,rmdir,pwd,more less,cmp. etc.(1.5)
·         explanation with example (3.5)
12.  Write a program to check whether the given number is prime or not.
#storing the number to be checked
number=43
i=2
  
#flag variable
f=0
  
#running a loop from 2 to number/2
while test $i -le `expr $number / 2` 
do
  
#checking if i is factor of number
if test `expr $number % $i` -eq
then
f=1
fi
  
#increment the loop variable
i=`expr $i + 1`
done
if test $f -eq
then
echo "Not Prime"
else
echo "Prime"
fi



Section C
Answer any 1 questions. It carries 15 marks.
13.  Explain different decision control and looping statements in shell script with example.
·         If,case,while,until,for – explanation(5)
·         Syntax with Example(10)
14.  Explain Linux architecture and advantages of Linux.
·         Tools&Application,Shell,kernel,Hardware(5)
·         Figure with explanation(10)




[Scan QR code for Answer Key]

Comments

Popular posts from this blog

UG, S1 BCA, First internal examination, Introduction to Problem Solving and Web Designing, September 2024