Home / CSE MCQs / C-MCQs :: Basic Linux

CSE MCQs :: C-MCQs

  1. pwd command displays
  2. A.
    user password
    B.
    password file content
    C.
    present working directory
    D.
    none of the mentioned

  3. Which of the following commands can be used to change default permissions for files and directories at the time of creation
  4. A.
    Chmod
    B.
    Chown
    C.
    Umask
    D.
    Chgrp

  5. Which tar command option is used to list the files in a tape archive format?
  6. A.
    cvf
    B.
    tvf
    C.
    xvf
    D.
    ovf

  7. Which of the following commands will allow the user to search contents of a file for a particular pattern
  8. A.
    touch
    B.
    grep
    C.
    find
    D.
    ls

  9. Write the command to display the current date in the form dd/mm/yyyy.
  10. A.
    date +%d/%m/%Y
    B.
    date +"%d/%m/%Y"
    C.
    date +/%d/%m/20%y
    D.
    date +"/%d/%m/20%y"

  11. The command syntax to display the file 'sample.txt' one page at a time is
  12. A.
    man sample.txt>more
    B.
    cat sample.txt
    C.
    cat sample.txt|more
    D.
    None of the above

  13. Which one shows the name of the operating system?
  14. A.
    uname -n
    B.
    uname -r
    C.
    uname -o
    D.
    uname "“m

  15. How do you add (append) a file "file1? to the example.tar file
  16. A.
    no you cannot add a file to example.tar
    B.
    tar -cvf example.tar file1
    C.
    tar -rvf file1 example.tar
    D.
    tar -evf file1 example.tar

  17. How to execute ls command inside a vi editor?
  18. A.
    !ls
    B.
    :ls
    C.
    :!ls
    D.
    we can't execute

  19. Which command gives the first byte where the difference is in the file1 & file2?
  20. A.
    diff
    B.
    cmp
    C.
    comm
    D.
    ls -a