Follow Us On
follow us
paper of os shell muj1

Exam section of megasasta.com

Paper of shell in os

Course=os
Subject=shell

Question no-1
What will be the output of echo $SHELL?


Optional Answers

(a)                  /bin/bash

(b)                  #!/bin/bash

(c)                  SHELL

(d)                  none of the above

Sollution

(a)                  /bin/bash

Question no-2
Which command displays content of a file in reverse order?


Optional Answers

(a)                  tac filename

(b)                  cat filename

(c)                  tail filename

(d)                  head filename

Sollution

(a)                  tac filename

Question no-3
Which command can be used to make a file write only?


Optional Answers

(a)                  chmod +w filename

(b)                  chmod 222 filename

(c)                  both a and b

(d)                  none of the above

Sollution

(b)                  chmod 222 filename

Question no-4
What will be the output of following command? mv filename location


Optional Answers

(a)                  copies file to new location

(b)                  copies file to new location and deletes file at original location

(c)                  copies file at location to home directory

(d)                  none of the above

Sollution

(b)                  copies file to new location and deletes file at original location

Question no-5
Which command displays 5th line of a file?


Optional Answers

(a)                  cat file / head -n 5 / tail -n 1

(b)                  cat file / head -l 5 / tail -l 1

(c)                  cat file / tail -n 6 / head -n 1

(d)                  none of the above

Sollution

(d)                  none of the above

Question no-6
Which command displays time?


Optional Answers

(a)                  which

(b)                  time

(c)                  cal

(d)                  date

Sollution

(d)                  date

Question no-7
Which command is used to search lines of a file having a given string?


Optional Answers

(a)                  grep

(b)                  pattern

(c)                  find

(d)                  which

Sollution

(a)                  grep

Question no-8
What will be the output of:
name=varun
echo "my name is $varun"


Optional Answers

(a)                  my name is varun

(b)                  my name is name

(c)                  my varun is varun

(d)                  none of these

Sollution

Question no-9
Which id these expressions is correct?


Optional Answers

(a)                  if ( $a -gt 1 ); then fi

(b)                  if ( $a -gt 1 ) then fi

(c)                  if ( $a -gt 1 ) endif

(d)                  none of the above

Sollution

(d)                  none of the above

Jai guru dev

We are giving free online platform/site so that indian people can give free advertisement to interchange their day to day goods online and product by post free advertisement or classified on mega sasta site by selling indian sasta saman online by this site. so that a wastage stuff of one indian person can be used by another indian person and both person can enjoy online or offline transaction free of cost by this site. buyer and seller both will be satisfy. Its a mega free advertisement online exchange for your day to day stuf without any mediator. You can give mega advertisement for indian car, bike, find coaching, furniture, buy sell books, table, mobile, plots, cloths, tv, laptops, vihicle, cell, phones, jeans, shirts, shoes, find jobs or antique. You can give free mega advertisement for anything on this site.

Creative Commons License
mega sasta by shubhali is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Permissions beyond the scope of this license may be available at http://megasasta.com/contactus.php.