Unix/Lunux MCQ Quiz Hub

Unix MCQ Set 01

Choose a topic to test your knowledge and improve your Unix/Lunux skills

The first set of the three permissions (rw) pertains to the owner of the file, indicating that the owner has





✅ Correct Answer: 4

Which of the following commands is used to obtain a list of all files by modification time?





✅ Correct Answer: 2

Which option will be used with disk free command to include the total amount of disk space in the file system?





✅ Correct Answer: 1

Which command is used to terminate all processes in your own system except the login shell?





✅ Correct Answer: 2

Which of the following commands is used to display your working directory?





✅ Correct Answer: 3

Which of the following commands is used to rename a file?





✅ Correct Answer: 3

Which command is used to save the standard output in a file, as well as display it on the terminal?





✅ Correct Answer: 4

Which command is used to copy all files having the string chap and any two characters after that to the progs directory?





✅ Correct Answer: 1

Which command will be used with vi editor to replace single character under cursor with any number of characters?





✅ Correct Answer: 1

Which symbol will be used with grep command to match the pattern pat at the end of a line?





✅ Correct Answer: 3

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





✅ Correct Answer: 2

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





✅ Correct Answer: 2

The cat command is used to





✅ Correct Answer: 2

Which command is used to count just the number of characters in a file?





✅ Correct Answer: 2

Which command is used to display the end of the file?





✅ Correct Answer: 2

Which of following commands is used for an automatic reminder service?





✅ Correct Answer: 3

While working with mail command, which command is used to save mail in a separate file?





✅ Correct Answer: 1

Which of the following commands can be used to get information about yourself?





✅ Correct Answer: 1

Which of the following keys is used to delete the character beneath the cursor?





✅ Correct Answer: 2

The cp command uses:





✅ Correct Answer: 4

Which command is used to locate all the .profile files in the system?





✅ Correct Answer: 2

Which command is used to display all the lines with the string 'sales' from the file empl.lst?





✅ Correct Answer: 3

Which of the following files contains information related to password aging?





✅ Correct Answer: 2

The [line number G] key allows you





✅ Correct Answer: 4

Which command sends the word count of the file infile to the newfile.





✅ Correct Answer: 1

Which option is used with the chmod command recursively to all files and sub-directories in a directory?





✅ Correct Answer: 4

The special shell variable $* is used





✅ Correct Answer: 3

Which of the following is not a communication command?





✅ Correct Answer: 4

Which set option is used with vi editor to display line numbers on screen?





✅ Correct Answer: 2

Which of the following signs is used to back up over typing errors in vi?





✅ Correct Answer: 2

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





✅ Correct Answer: 1

Which command is used to list out all the hidden files along with the other files?





✅ Correct Answer: 4

The octal representation 652 indicates





✅ Correct Answer: 2

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





✅ Correct Answer: 1

Which of the following commands is used to assign executable permission to the owner of the file named "note"?





✅ Correct Answer: 3

The command that can be used to restrict incoming messages to a user is





✅ Correct Answer: 1

In vi editor, forward search is performed using the command.





✅ Correct Answer: 3

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





✅ Correct Answer: 1

Which option is used with cmp command to give a detailed list of the byte number and the differing bytes in octal for each character that differs in both the files?





✅ Correct Answer: 1

The % key allows you





✅ Correct Answer: 1

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?





✅ Correct Answer: 2

Which command will be used with vi editor to append text at end of line?





✅ Correct Answer: 2

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





✅ Correct Answer: 1

Which command is used to sort the lines of data in a file in alphabetical order?





✅ Correct Answer: 1

Which of the following shell's wildcards are used to match any number of characters including none?





✅ Correct Answer: 4

Which column contains all details of the permissions of a file when you issue the ls -l command?





✅ Correct Answer: 4

Which is the earliest and most widely used shell that came with the UNIX system?





✅ Correct Answer: 3

You can append to a file instead of overwriting by using the





✅ Correct Answer: 2

You can append to a file instead of overwriting by using the





✅ Correct Answer: 2

Which option will be used with sort command to start sorting ofter the nth column of the (m+l)th field?





✅ Correct Answer: 2

The ls -l command tells





✅ Correct Answer: 4

The UNIX file system stores a data in physical blocks of





✅ Correct Answer: 3

Which command is used to sort the lines of data in a file in reverse order





✅ Correct Answer: 4

Which of the following commands can be used to get information about all users who are currently logged into the system?





✅ Correct Answer: 2

Which of are following internal commands is used in mail to forward mail to user in user-list?





✅ Correct Answer: 2

Which command is used to extract specific columns from the file?





✅ Correct Answer: 2

Which of the following is not a filter?





✅ Correct Answer: 4

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





✅ Correct Answer: 1

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





✅ Correct Answer: 4

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





✅ Correct Answer: 1

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





✅ Correct Answer: 4

Which of the following is invalid filename?





✅ Correct Answer: 4

Which of the following commands is used to copy directory structures in and out





✅ Correct Answer: 2

Which of the following commands is used to copy directory structures in and out





✅ Correct Answer: 2

Which command is used to remove a file?





✅ Correct Answer: 2

Which of the following commands is used to absolutely assign all permissions to the owner, read and write permissions to the group and only executable permission to the others of the file note?





✅ Correct Answer: 1

Which of the following commands is used to absolutely assign all permissions to the owner, read and write permissions to the group and only executable permission to the others of the file note?





✅ Correct Answer: 1

Which command is used to assign only read permission to all three categories of the file 'note'?





✅ Correct Answer: 3

Which command is used to display a file contents in octal form?





✅ Correct Answer: 2

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





✅ Correct Answer: 2

Which command is used with vi editor to save file and remain in the editing mode?





✅ Correct Answer: 2

Which of the following command addresses all users who are currently hooked on?





✅ Correct Answer: 3

Which of the following commands is used to remove files with confirmation prompt from the user file system which have neither been accessed nor modified i the last one year?





✅ Correct Answer: 4

Which command is used to link the files?





✅ Correct Answer: 2

Which of the following commands is used to identify the type of file by context?





✅ Correct Answer: 3

Which command is used to copy a file wb with the same name from the programs directory to the misc directory?





✅ Correct Answer: 2

Which of the following command is used to go to home directory?





✅ Correct Answer: 3

The second set of the three permissions (r-) indicates that





✅ Correct Answer: 1

Which command is used to set the three permissions for all the three categories of users of a file?





✅ Correct Answer: 3