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

  • (A) countw
  • (B) wc
  • (C) wcount
  • (D) count p
πŸ’¬ Discuss
βœ… Correct Answer: (B) wc

Q. Which of the following commands is used to list contents of directories?

  • (A) tar
  • (B) 1p
  • (C) dir
  • (D) 1s
πŸ’¬ Discuss
βœ… Correct Answer: (D) 1s

Q. Which of the following commands is used to list remove files?

  • (A) dm
  • (B) delete
  • (C) rm
  • (D) erase
πŸ’¬ Discuss
βœ… Correct Answer: (C) rm

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

  • (A) wc - r
  • (B) wc - c
  • (C) wc - w
  • (D) wc – 1
πŸ’¬ Discuss
βœ… Correct Answer: (D) wc – 1

Q. Which of the following directories contain all the files created by a user, including his login directory?

  • (A) /dev
  • (B) /etc
  • (C) /usr
  • (D) /tmp
πŸ’¬ Discuss
βœ… Correct Answer: (C) /usr

Q. 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?

  • (A) copywb collect mon /mis
  • (B) cpwb collect mon ../misc
  • (C) copywb ../misccollect ../mismon ../misc
  • (D) tarwb collect mon /misc
πŸ’¬ Discuss
βœ… Correct Answer: (B) cpwb collect mon ../misc

Q. Which command is used to assign only read permission to all three categories of the file ‘note’?

  • (A) chmodu+r, g+r, o-x note
  • (B) chmodugo = r = note
  • (C) chmodgo+r note
  • (D) chmod a-rw
πŸ’¬ Discuss
βœ… Correct Answer: (B) chmodugo = r = note

Q. Which command is used to make all files and sub-directories in the directory (prog) executable by all users?

  • (A) chmod –R 222 progs
  • (B) chmod -1 a+xprogs
  • (C) chmod –x a+xprogs
  • (D) chmod –R a+xprogs
πŸ’¬ Discuss
βœ… Correct Answer: (D) chmod –R a+xprogs

Q. The chmodugo+rw note command can be represented in octal notation as

  • (A) chmod 333 note
  • (B) chmod 444 note
  • (C) chmod 666 note
  • (D) chmod 555 note
πŸ’¬ Discuss
βœ… Correct Answer: (C) chmod 666 note

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

  • (A) /p
  • (B) cat
  • (C) 1p
  • (D) pg
πŸ’¬ Discuss
βœ… Correct Answer: (D) pg