Unix

25 Questions | Total Attempts: 509

SettingsSettingsSettings
Please wait...
Unix Quizzes & Trivia

.


Questions and Answers
  • 1. 
    The symbol used to append to a file when redirecting stdout to the file
    • A. 

      >

    • B. 

      >>

    • C. 

      2>

    • D. 

  • 2. 
    When a script command is used to record the session, the recorded session is stored in a file called
    • A. 

      Script.txt

    • B. 

      Script.out

    • C. 

      Typescript

    • D. 

      None of the above

  • 3. 
    What command is used to create nested directory using a single command.
    • A. 

      $mkdir -r oracle/table/column/values

    • B. 

      $mkdir -p oracle/table/column/values

    • C. 

      $mkdir -n oracle/table/column/values

    • D. 

      All the above

  • 4. 
    Choose the correct answer for displaying the inode number of a file called sample.dat
    • A. 

      $cat –i sample.dat

    • B. 

      $touch –i sample.dat

    • C. 

      Both a) and b)

    • D. 

      None of the Above

  • 5. 
    While using “less” command,a.     Spacebar – Read next page.b.     b – Go back one page.
    • A. 

      A-True ; b-True

    • B. 

      A-True ; b-False

    • C. 

      A-False ; b-True

    • D. 

      A-False ; b-False

  • 6. 
    When you execute a command $ps –e the output will be shown as shown below. Which among the following is false about this output?PID    TTY    TIME          CM  1         ?      00:00:04     init  2         ?      00:00:00     keventd  3         ?      00:00:00     kapmd  .          .       . . . . . .      . . . . .   .          .       . . . . . .      . . . . .
    • A. 

      System processes can be easily understood by the ? in TTY column

    • B. 

      For System Process the standard input and standard output are not connected to the terminal

    • C. 

      You can interrupt these process by pressing[cntl-c]

    • D. 

      The system process are called as deamons

  • 7. 
    What is the command to list all the files in the system greater than 100MB.
    • A. 

      # find / -type f -size +100M

    • B. 

      # find –type f –size +100M

    • C. 

      Both a) and b)

    • D. 

      None

  • 8. 
    The output of 'ls -l' command gives a line 'Total 160'. The value 160 refers to:
    • A. 

      Total number of inodes

    • B. 

      Total number of blocks

    • C. 

      Total number of files

    • D. 

      Total number of directories

  • 9. 
    Arrange the following in a proper order the way shell interprets.a.     Loads into the memoryb.     Executes itc.      Reads the commandd.     Searches for and locates the file with that name in the directories containing commands.  
    • A. 

      A,b,c,d

    • B. 

      C,d,a,b

    • C. 

      D,c,b,a

    • D. 

      B,a,d,c

  • 10. 
    Which of the following options of date command can be used to display Hour in the format of 00 to 23?
    • A. 

      %h

    • B. 

      %H

    • C. 

      %hh

    • D. 

      %HH

  • 11. 
    Which of the following options of date command can be used to display abbreviated weekday?
    • A. 

      %a

    • B. 

      %w

    • C. 

      %day

    • D. 

      None

  • 12. 
    You want to repeat the last command you entered. How would you do this?
    • A. 

      #

    • B. 

      !!

    • C. 

      #1

    • D. 

      ##

  • 13. 
    What's the standard minimum user ID number for regular users on Red Hat distributions?
    • A. 

      501

    • B. 

      502

    • C. 

      500

    • D. 

      None of the above

  • 14. 
    A command that takes input from standard input file and gives output to standard output file is called:  
    • A. 

      Pipe

    • B. 

      Filter

    • C. 

      Semaphore

    • D. 

      None of the above

  • 15. 
    A user wants to give read, write and execute permission to user, read and execute to others as resultant permissions irrespective of the existing permissions for a file called myshell1. This is achieved by:
    • A. 

      Chmod 750 myshell1

    • B. 

      Chmod ug+rx myshell1

    • C. 

      Chmod u+rwx o+rx myshell1

    • D. 

      None

  • 16. 
    What is the output of the following script #!/usr/bin/bashecho “The first argument is: $1”if the argument passed to the script while execution areRed Green Blue
    • A. 

      The first argument is: Green

    • B. 

      The first argument is: Red

    • C. 

      The first argument is: Blue

    • D. 

      None

  • 17. 
    The standard error device is  
    • A. 

      A user defined file

    • B. 

      Monitor

    • C. 

      A system defined file

    • D. 

      None of the above

  • 18. 
    How do you verify whether a particular package is installed on your system or not?
    • A. 

      Rpm –ivh package_name

    • B. 

      Rpm –U package_name

    • C. 

      Rpm -qa

    • D. 

      Rpm –q package_name

  • 19. 
    Which of the following statements is invalid ?
    • A. 

      Expr $a + $b

    • B. 

      Expr $a * $b

    • C. 

      Expr $a - $b

    • D. 

      Expr $a + $b - $c

  • 20. 
    A user modifies his .profile file and he wants to make the modifications in effect without logging out. How is this achieved
    • A. 

      Issue the command . .profile(dot .profile)

    • B. 

      Issue the command sh .profile

    • C. 

      Give execute permission and issue the command .profile

    • D. 

      User needs to logout to reflect the same

  • 21. 
    What does  tail -5 emp.lst do..?
    • A. 

      List all the lines of emp.lst file

    • B. 

      List the last 10 lines of emp.lst file

    • C. 

      List the last 5 lines of emp.lst file

    • D. 

      None

  • 22. 
    Which command displays the input you entered through the standard input as well as the contents of the file?
    • A. 

      Cat – file1

    • B. 

      Cat \etc\$0 file1

    • C. 

      Cat %0 file1

    • D. 

      Cat \etc\si file1

  • 23. 
    “init” run-level for system shutdown is
    • A. 

      3

    • B. 

      2

    • C. 

      1

    • D. 

      0

  • 24. 
    What command lists all installed RPMs which also contains the RPMs installed when you first installed the local system?
    • A. 

      Rpm *

    • B. 

      Rpm –qa *

    • C. 

      Both (a) & (b)

    • D. 

      Rpm -qa

  • 25. 
         How do u automatically correctthe mistyped directory names on the command cd
    • A. 

      $shopt –s spell

    • B. 

      $spell –s cd

    • C. 

      $shopt –s cdspell

    • D. 

      All the above