Unix/Lunux MCQ Quiz Hub

Linux Mcqs Questions Set 2

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

Which command is used to display all the files including hidden files in your current and its subdirectories ?





✅ Correct Answer: 1

Which of the following commands can be used to copy files across systems?





✅ Correct Answer: 4

pwd command displays





✅ Correct Answer: 3

Which of the following commands can be used to change default permissions for files and directories at the time of creation





✅ Correct Answer: 3

Which tar command option is used to list the files in a tape archive format?





✅ Correct Answer: 2

Which of the following commands will allow the user to search contents of a file for a particular pattern





✅ Correct Answer: 2

Write the command to display the current date in the form dd/mm/yyyy.





✅ Correct Answer: 1

The command syntax to display the file sample.txt one page at a time is





✅ Correct Answer: 3

Which one shows the name of the operating system?





✅ Correct Answer: 3

How do you add (append) a file file1 to the example.tar file





✅ Correct Answer: 3

How to execute ls command inside a vi editor?





✅ Correct Answer: 3

Which command gives the first byte where the difference is in the file1 & file2?





✅ Correct Answer: 2

To open a file file1 with cursor at line number 4





✅ Correct Answer: 1

sed is a command typically used for





✅ Correct Answer: 3

What communication command provides communication to another user logged on by writing to the bottom of their terminal?





✅ Correct Answer: 1

Which screen manipulation command sets the screen back to normal?





✅ Correct Answer: 3

Which command will you use to see the available routes?





✅ Correct Answer: 3

Which of the following time stamps need not exist for a file on traditional unix file system





✅ Correct Answer: 3

Which command is used to set limits on file size





✅ Correct Answer: 3

Which option of rmdir command will remove all directories a, b, c if path is a/b/c





✅ Correct Answer: 3

Which represents the user home directory





✅ Correct Answer: 4

If a file is removed in Unix using rm then





✅ Correct Answer: 2

Executing the cd .. command when at the root level causes





✅ Correct Answer: 4

How do you rename file new to file old ?





✅ Correct Answer: 1

What command is used to copy files and directories?





✅ Correct Answer: 2

When mv f1 f2 is executed which files inode is freed?





✅ Correct Answer: 2

Any files attribute information is stored in which structure on the disk





✅ Correct Answer: 1

When you use the ln command, which of the following occurs?





✅ Correct Answer: 1

srwxr-xrw- is a





✅ Correct Answer: 2

Binary or executable files are:





✅ Correct Answer: 1

The directory file contains:





✅ Correct Answer: 2

Which directory contain device special files?





✅ Correct Answer: 4

Which of the following is not a valid file type on Linux





✅ Correct Answer: 3

Which of the following is not correct statement regarding file types?





✅ Correct Answer: 2

Which are the two types of device files?





✅ Correct Answer: 1

Which is an example for character special file?





✅ Correct Answer: 3

Which is an example for block special file?





✅ Correct Answer: 2

 All device files are stored in which directory?





✅ Correct Answer: 3

The file permission 764 means:





✅ Correct Answer: 3

The permission -rwxr–r– represented in octal expression will be





✅ Correct Answer: 3

Effective user id can be set using following permission





✅ Correct Answer: 3

Effective group id can be set using following permission





✅ Correct Answer: 2

Sticky bit can be set using following permission





✅ Correct Answer: 4

The permission -rwSr–r– represented in octal expression will be





✅ Correct Answer: 4

The permission -rwxr-sr– represented in octal expression will be





✅ Correct Answer: 4

If user tries to remove (rm) a readonly file (444 permission), what will happen?





✅ Correct Answer: 2

A user does a chmod operation on a file. Which of the following is true?





✅ Correct Answer: 3

If the umask value is 0002. what will be the permissions of new directory





✅ Correct Answer: 2

What is the command to set the execute permissions to all the files and subdirectories within the directory /home/user1/direct





✅ Correct Answer: 2

The permission -rwxr-xr-t represented in octal expression will be





✅ Correct Answer: 2