Follow Us On
follow us
paper of Embedded System Linux LAB .

Exam section of megasasta.com

Paper of Linux LAB in Embedded System

Course=Embedded System
Subject=Linux LAB

Question no-1
Which command can be used to count number of lines in a file?


Optional Answers

(a)                  lc filename

(b)                  wc filename

(c)                  wc l filename

(d)                  wc n filename

Sollution

(c)                  wc l filename

Question no-2
Which command can be used to display only current month (April)?


Optional Answers

(a)                  cal | head c 10

(b)                  date | head c 10 | tail c 6

(c)                  cal m

(d)                  date m

Sollution

(a)                  cal | head c 10

Question no-3
Which of the following condition is true and has correct syntax? Given a=10 and b=20.


Optional Answers

(a)                  if ( $a lt $b ) then { }

(b)                  if [ $a lt $b ] then fi

(c)                  if [$ a < $b ]; then do done

(d)                  if [$a lt $b ]; then fi

Sollution

(d)                  if [$a lt $b ]; then fi

Question no-4
How do you find out whats your shell?


Optional Answers

(a)                  echo $SHELL

(b)                  echo SHELL

(c)                  echo $shell

(d)                  both a and c

Sollution

(a)                  echo $SHELL

Question no-5
How do you find out the current directory youre in?


Optional Answers

(a)                  path

(b)                  dir

(c)                  pwd

(d)                  who

Sollution

(c)                  pwd

Question no-6
How do you search for a string inside a given file?


Optional Answers

(a)                  grep string filename

(b)                  ls -l | grep string > filename

(c)                  grep v string filename

(d)                  all of the above

Sollution

(a)                  grep string filename

Question no-7
How does a case statement looks in shell scripts?


Optional Answers

(a)                  case $choice in do a) ;; b);; *) ;; done

(b)                  case $choice is a) ; b); *) ; esac;

(c)                  case $choice in a) ;; b);; *) ;; end

(d)                  case $choice in a) ;; b);; *) ;; esac

Sollution

(d)                  case $choice in a) ;; b);; *) ;; esac

Question no-8
How do you remove a directory?


Optional Answers

(a)                  rm

(b)                  rm dir

(c)                  rmdir

(d)                  all of the above

Sollution

(c)                  rmdir

Question no-9
Given a file f1.txt with permissions r-xr-xr-x . Which command is used to change the file permissions to rwxr-x-w- ?


Optional Answers

(a)                  chmod 555 f1.txt

(b)                  chmod 762 f1.txt

(c)                  chmod 564 f1.txt

(d)                  chmod 752 f1.txt

Sollution

(d)                  chmod 752 f1.txt

Question no-10
Which of the following command can be used to display only the 9th line of a file file1.txt? Assume that file1.txt contains 100 lines.


Optional Answers

(a)                  cat file1.txt | head n 9 | tail n 1

(b)                  cat file1.txt | tail n 90 | head n 1

(c)                  cat file1.txt | tail n 9 | head n 1

(d)                  all of the above

Sollution

(a)                  cat file1.txt | head n 9 | tail n 1

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.