Unix Questions and Answers

Take Exam

The Unix operating system is a powerful, multitasking platform widely used in computing environments. Knowledge of Unix commands, file handling, and process management is vital for students and professionals preparing for programming questions and answers in technical interviews and campus placements at TCS, IBM, and Tech Mahindra. This guide includes Unix MCQs and problem-solving examples that focus on shell scripting, permissions, and file system hierarchy. Practicing these questions improves command-line fluency and builds the foundation for advanced OS and system administration roles.

Unix

Showing 10 of 49 questions

11. Which of the following commands is used to display the directory attributes rather than its contents?

  • ls -1 -d
  • ls -1
  • ls -x
  • ls -F
Show Answer Report

12. Which of the following files will displayed by this command cat *ch*

  • patch
  • catch
  • .ch
  • All of the above
Show Answer Report

13. The Octal number to be given alogn with chmod command to make a file readable, writable and executable to the owner, readable and executable to group and others is:

  • 000
  • 755
  • 744
  • 555
Show Answer Report

14. If you are to use [Control-c] as the interrupt key instead of [Del], then you will have to use

  • tty ^c
  • stty intr \^c
  • stty echoe
  • stty echo \^a
Show Answer Report

15. Which of the following is not a communication command.

  • write
  • mesg
  • mail
  • grep
Show Answer Report

16. Which of the following keys is used to move the cursor to the end of the paragraph.

  • }
  • {
  • |
  • $
Show Answer Report

17. Which command is used to concatenate all files beginning with the string 'emp' and followed by a non-numeric characters?

  • cat emp[!0-9]
  • more [emp][!0-9]
  • cat emp[x-z]
  • cat emp[a-z]
Show Answer Report

18. The command which transcribes the standard input to the standard output and also makes a copy of the same in a file is

  • tee
  • tr
  • sort
  • grep
Show Answer Report

19.  Which command is used to remove a file?

  • remove
  • rm
  • mv
  • del
Show Answer Report

20. Which symbol is used to separate more than one command in the same command line?

  • $
  • #
  • :
  • ;
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test