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

Computer Science :: Unix & Linux Basics

  1. Which of the following command is used to count just the number of lines contained in a file?

  2. A.

     wc -l

    B.

     wc -c

    C.

     wc -w

    D.

     wc -r

    E.

     None of the above


  3. Which of the following command is used to go to home directory?

  4. A.

     cd..

    B.

     cd/

    C.

     cd

    D.

     cd HOME.

    E.

     None of the above


  5. Which command is used to move all files to the bin sub-directory of the parent directory?

  6. A.

     mv *.* /bin/

    B.

     mv * /bin/*

    C.

     mv * ../bin

    D.

     mv * ../bin *.*

    E.

     None of the above


  7. Which command is used to save the standard output in a file, as well as display it on the terminal?

  8. A.

     more

    B.

     cat

    C.

     grep

    D.

     tee

    E.

     None of the above


  9. The command that can be used to restrict incoming messages to a user is

  10. A.

     mesg

    B.

     grep

    C.

     halt

    D.

     sleep

    E.

     None of the above


  11. Which of the following commands is used to copy directory structures in and out

  12. A.

     cp

    B.

     cpio

    C.

     cp - p

    D.

     copy

    E.

     None of the above


  13. Which of following commands is used for an automatic reminder service?

  14. A.

     write

    B.

     mesg

    C.

     calendar

    D.

     mail

    E.

     None of the above


  15. Which command allows you to view your file 24 lines at a time?

  16. A.

     more

    B.

     pg

    C.

     cat

    D.

     lp

    E.

     None of the above


  17. Which of the following special shell variables is used to process number of the current shell?

  18. A.

     $!

    B.

     $$

    C.

     $0

    D.

     $*

    E.

     None of the above


  19. Which option is used with cmp command to give a detailed list of the byte number and the differing bytes in octal for each character that differs in both the files?

  20. A.

     -l

    B.

     -d

    C.

     -r

    D.

     -b

    E.

     None of the above