Home / Computer Science / Unix & Linux Basics :: section-1

Computer Science :: Unix & Linux Basics

  1. Which command is used with vi editor to move cursor forward to first occurrence of character 'ch' in the current line?

  2. A.

     tch

    B.

     fch

    C.

     rch

    D.

     ech

    E.

     None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of the following keys is used to delete the character beneath the cursor?

  4. A.

     x

    B.

     X

    C.

     dd

    D.

     D

    E.

     None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which command is used to assign only read permission to all three categories of the file 'note'?

  6. A.

     chmod go+r note

    B.

     chmod a-rw

    C.

     chmod ugo=r note

    D.

     chmod u+r,g+r,o-x note

    E.

     None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which command will be used with vi editor to append text at end of line?

  8. A.

     A

    B.

     a

    C.

     i

    D.

     I

    E.

     None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. The first set of the three permissions (rw) pertains to the owner of the file, indicating that the owner has

  10. A.

     executable permission only

    B.

     write and executable permissions

    C.

     both read and executable permissions.

    D.

     both read and write permissions

    E.

     None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which of the following commands is used to save the output of the who command in a file named user.lst, as well as display it?

  12. A.

     who | tee user.lst

    B.

     who > user.lst

    C.

     who >> user.lst

    D.

     who < user.lste

    E.

     None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Which of the following shell's wildcards are used to match any number of characters including none?

  14. A.

     [ijk]

    B.

     [!ijk]

    C.

     ?

    D.

     *

    E.

     None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. The command used to remove the directory is;

  16. A.

     rmdir

    B.

     rd

    C.

     remove

    D.

     rdir

    E.

     None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which symbol will be used with grep command to match the pattern pat at the end of a line?

  18. A.

     ^pat

    B.

     $pat

    C.

     pat$

    D.

     pat^

    E.

     None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Which command is used to display all the lines with the string 'sales' from the file empl.lst?

  20. A.

     cut sales empl.lst

    B.

     /sales > empl.lst

    C.

     grep sales empl.lst

    D.

     cat | /sales > empl.lst

    E.

     None of the above

    View Answer

    Workspace

    Discuss Discuss in Forum