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
31. Which option is used with rm command to make the command prompt the user with each filename and a ?, before acting on it
- -r
- -x
- -i
- -1
32. Which of the following directories contain all the Ales created by a user, including his login directory?
- /tmp
- /etc
- /usr
- /dev
33. Which of the following commands is used to obtain a list of all files by modification time?
- ls -1
- ls -t
- ls -i
- ls -R
34. The % key allows you
- to move the cursor to a matching delimiter, when a delimiters a parenthesis, a bracket, or a brace.
- to move the cursor to the upperleft corner of the screen
- to move the cursor backward to the beginning of a word
- to move the cursor to the first column in the current line
35. Which command is used to display the characteristics of a process?
- pid
- du
- ps
- au
36. Which of the following commands is used to identify the type of file by context?
- ls
- cat
- file
- more
37. The filed separator in cut command is specified with
- -a option
- -d option
- -r option
- -x option
38. Which of the following options will be used to display number of blocks used by a file?
- -c
- -i
- -d
- -s
39. Which option will be used with touch command to change the access time?
- -a
- -b
- -t
- -h
40. Which command is used to make all files and sub-directories in the directory (progs) executable by all users?
- chmod -R a+x progs
- chmod -R 222 progs
- chmod -1 a+x progs
- chmod -x a+x progs