Unix Questions and Answers
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
12. Which of the following files will displayed by this command cat *ch*
- patch
- catch
- .ch
- All of the above
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
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
16. Which of the following keys is used to move the cursor to the end of the paragraph.
- }
- {
- |
- $
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]
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
20. Which symbol is used to separate more than one command in the same command line?
- $
- #
- :
- ;