Unix - Application Developers

35 Questions
Unix Quizzes & Trivia

Technical Questionnaire for UNIX Application Developers

Sample Question

Which of the following UNIX commands will not take the user student5 to his personal home direcotry:

Cd

Cd /~

Cd ~

Cd ~student5

Number of Questions:

More Options
Please wait...
Questions and Answers
  • 1. 
    Which of the following UNIX commands will not take the user student5 to his personal home direcotry:
    • A. 

      Cd

    • B. 

      Cd /~

    • C. 

      Cd ~

    • D. 

      Cd ~student5

  • 2. 
    What is a shell in UNIX:
    • A. 

      A program through which users can issue commands to UNIX.

    • B. 

      A window management system.

    • C. 

      The logn screen.

    • D. 

      The thing that rides on the back of a turtle in UNIX.

  • 3. 
    What is the generic syntax for all UNIX commands:
    • A. 

      Command name, followed by arguments, followed by options

    • B. 

      Command name, followed by arguments,

    • C. 

      Command name, followed by options

    • D. 

      Command name, followed by options, followed by arguments

  • 4. 
    Which of the following represents an absolute path:
    • A. 

      ./home/file.txt

    • B. 

      Bin/cat

    • C. 

      Cs2204/

    • D. 

      /usr/bin/cat

  • 5. 
    • A. 

      Chmod 046 textfile

    • B. 

      Chmod 640 textfile

    • C. 

      Chmod 310 textfile

    • D. 

      Chmod rw r nil textfile

  • 6. 
    Which of the following is not a UNIX file type:
    • A. 

      Plain file

    • B. 

      Special file

    • C. 

      Batch file

    • D. 

      Directory file

  • 7. 
    When the in command is used, which of the following occurs:
    • A. 

      A file is created that points to an existing file.

    • B. 

      A file is created that is a copy of an existing file.

    • C. 

      A file is moved from one location to another.

    • D. 

      A file is renamed.

  • 8. 
    Which command will print the contents of ll files inthe current directory whose names start with the character 'a' and end with a period ('.') followed by any two characters followed by a number:
    • A. 

      Is a*.??[0-9]

    • B. 

      Is a*.??#

    • C. 

      Cat a*.??[0-9]

    • D. 

      Cat a?.**#

  • 9. 
    The apropos command is used to:
    • A. 

      Obtain a list of commands whose description contains given keywords.

    • B. 

      Change the system language to French

    • C. 

      Get help on a particular command.

    • D. 

      Create a new binary file.

  • 10. 
    Which of these is not a common UNIX shell:
    • A. 

      Bash

    • B. 

      Sh

    • C. 

      Fresh

    • D. 

      Ksh

  • 11. 
    In ksh, what is the difference between the expressions VAR and $VAR:
    • A. 

      VAR refers to a variable name and $VAR to its value.

    • B. 

      VAR refers to a variable value and $VAR to its name.

    • C. 

      VAR refers to an integer variable and $VAR to a string variable.

    • D. 

      Both expressions refer to the same thing.

  • 12. 
    Which of these expressions shows the proper way to add the directory /usr/bin to a path:
    • A. 

      PATH+=/usr/bin

    • B. 

      PATH=/usr/bin

    • C. 

      $PATH:/usr/bin

    • D. 

      PATH=$PATH:/usr/bin

  • 13. 
    What is the default datatype of variables in ksh shell scripts:
    • A. 

      Integer

    • B. 

      Floating point

    • C. 

      Character

    • D. 

      String

  • 14. 
    • A. 

      My_script dos not have execute permission set.

    • B. 

      The current working directory is not in the PATH.

    • C. 

      Both a and b.

    • D. 

      Neither a nor b.

  • 15. 
    In a ksh script, how is the beginning and end of a block of statements in a while loop indicated.
    • A. 

      With { and }

    • B. 

      With [ and ]

    • C. 

      With while and elihw.

    • D. 

      With do and done.

  • 16. 
    What is the meaning of the expression ${sports[*]} in a ksh script:
    • A. 

      All of the elements of the array sports.

    • B. 

      The number of elements in the array sports.

    • C. 

      The first element in the array sports.

    • D. 

      I love sports!

  • 17. 
    What is the default list upon which a for loop operates in a ksh script (i.e. a script contains "for x" rather than "for x in y").
    • A. 

      The list of files in the current working directory.

    • B. 

      The list of currently running processes.

    • C. 

      The list of arguments to the script

    • D. 

      The list 1, 2, 3, 4, ...

  • 18. 
    What UNIX command is used to update the modification time of a file:
    • A. 

      Time

    • B. 

      Modify

    • C. 

      Cat

    • D. 

      Touch

  • 19. 
    In which situation can regular expressions not be used.
    • A. 

      Filtering of email coming from a particular internet domain name.

    • B. 

      Calculation of student grades based on percentaes.

    • C. 

      Extraction of all transactions in a database with a customer number of 1000 or less.

    • D. 

      Specification of the format of a string representing a zip code.

  • 20. 
    What would be the output of the command:  egrep "^[^A-Za-z].*!" file:
    • A. 

      All lines in file beginning with a non-alphabetic character and containing an exclamation point elsewhere on the line.

    • B. 

      The number of lines in file beginning with a non-alphabetic character and containing an exclamation point elsewhere on the line.

    • C. 

      All lines in file beginning with an alphabetic character and containing a period, an asterisk, and an exclamation point.

    • D. 

      The number of lines in file not containing any alphabetic characters before the first exclamation point..

  • 21. 
    Which string(s) would be matched by the regular expression:| "stu(dent)? [0-9]+".
    • A. 

      Student 1

    • B. 

      Student

    • C. 

      Stu 195819588491

    • D. 

      Studentdent 5

  • 22. 
    Which regular expression (egrep style) means "all lines beginning with a number.
    • A. 

      “[^0-9]”

    • B. 

      “^[#]”

    • C. 

      “^[0-9]”

    • D. 

      “[0-9].*$”

  • 23. 
    Which regular expresion (egrep style) means "all lines containing an alphabetic word ending with ".txt" followed by a space or the end of the line":
    • A. 

      "*.txt "

    • B. 

      "*.txt( |$)"

    • C. 

      "[a-zA-Z]*\.txt( |$)"

    • D. 

      "[a-zA-Z]?\.txt\n"

  • 24. 
    In order to edit a file called sample.txt, it will be necessary to type:
    • A. 

      Edit sample.txt

    • B. 

      Vi sample.txt

    • C. 

      Sample.txt

    • D. 

      Vi qui - TAB.

    • E. 

      None of the above

  • 25. 
    In order to delete a word in a file using vi, place the cursor on the first letter of the word, ESC and type:
    • A. 

      Dw

    • B. 

      A

    • C. 

      X

    • D. 

      Z

    • E. 

      None of the above.

  • 26. 
    In vi, in order to make changes to a file and then save the work, type:
    • A. 

      ESC - :wq

    • B. 

      :w!

    • C. 

      :quit

    • D. 

      :save

    • E. 

      ALT FS

  • 27. 
    Which command would delete a single line:
    • A. 

      Del

    • B. 

      DELETE

    • C. 

      Dl

    • D. 

      Er

    • E. 

      None of the above

  • 28. 
    Why should macros (variables) be used in a Makefile?
    • A. 

      A single change to a macro can have a large effect on the way a target is built.

    • B. 

      Macros can be used to override some of make’s defaults.

    • C. 

      Correct use of macros allow a Makefile meant for one purpose to be easily converted for use in another context.

    • D. 

      All of the above.

  • 29. 
    In UNIX, a "process" refers to:
    • A. 

      Compiled source code.

    • B. 

      Uncompiled source code

    • C. 

      An executing instance of a program

    • D. 

      An executable file.

  • 30. 
    The term for an integer that defines the execution priority of a process is:
    • A. 

      Nice value

    • B. 

      Pvalue

    • C. 

      Importance index

    • D. 

      Run number

  • 31. 
    Which UNIX system call is used to create a new process:
    • A. 

      Creat()

    • B. 

      New()

    • C. 

      Open()

    • D. 

      Ork()

  • 32. 
    Pipes are an example of what inter-process communication paradigm?
    • A. 

      Message passing

    • B. 

      File sharing

    • C. 

      Shared memory

    • D. 

      Smoke signals

  • 33. 
    Most UNIX system configuration files are located in which directory:
    • A. 

      /

    • B. 

      /config

    • C. 

      /etc

    • D. 

      /startup

  • 34. 
    System administration tasks must generally be performed by which username:
    • A. 

      Admin

    • B. 

      Root

    • C. 

      Nobody

    • D. 

      Sysadm

  • 35. 
    Which of the following pieces of informaiton is not contained in the passwd file?
    • A. 

      A user’s unencrypted password

    • B. 

      A user’s login name

    • C. 

      A user’s preferred shell program

    • D. 

      A user’s group ID