Home / CSE / Unix :: Section 2

CSE :: Unix

  1. The command to count the number of files in the current directory by using pipes, is

  2. A.
    ls | wc
    B.
    ls -l | wc -l
    C.
    ls | wc -w
    D.
    ls | ws -c
    E.
    None of the above

  3. Which of the following commands is used to get directory one level up?

  4. A.
    cd
    B.
    cd ..
    C.
    cd/
    D.
    chdir
    E.
    None of the above

  5. Which of the following commands is used to count the total number of lines, words, and characters contained in a file.

  6. A.
    count p
    B.
    wc
    C.
    wcount
    D.
    countw
    E.
    None of the above

  7. Which command is used to delete all files in the current directory as well as all files and sub-directories in its subdirectories?

  8. A.
    rm *
    B.
    rm -r *
    C.
    rm all
    D.
    rm *.*
    E.
    None of the above

  9. Which of the following commands is used to change the working directory?

  10. A.
    cd
    B.
    changedir
    C.
    chdir
    D.
    cdir
    E.
    None of the above

  11. Which of the following commands is used to view your file 24 lines at a time?

  12. A.
    pg
    B.
    cat
    C.
    lp
    D.
    /p
    E.
    None of the above

  13. Which shell's wild-cards is used to match a single character?

  14. A.
    *
    B.
    ?
    C.
    [ijk]
    D.
    [!ijk]
    E.
    None of the above

  15. In Bourne shell, which file sets the Unix environment for the user when the logs into his HOME directory.

  16. A.
    .exrc
    B.
    .profile
    C.
    lastlogin
    D.
    .mbox
    E.
    None of the above

  17. Which command is used to copy the three files wb, collect and mon into the misc directory, under the same, when you were currently in the programs directory?

  18. A.
    copy wb ../misc collect ../misc mon ../misc
    B.
    cp wb collect mon ../misc
    C.
    copy wb collect mon /misc
    D.
    tar wb collect mon /misc
    E.
    None of the above

  19. The command chmod 761 note is equivalent to

  20. A.
    chmod 167 note
    B.
    chmod u=rwx, g=rw, o=x note
    C.
    chmo a =761 note
    D.
    chmod 4=7, g=6,0 =1 note
    E.
    None of the above