Unix/Lunux/Linux Mcqs Questions Set 2 Sample Test,Sample questions

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

1.The last accessed time of the file is updated

2.The last modification time of the file is updated

3.The last change time of the file is updated

4.None of the mentioned

Posted Date:-2021-06-28 14:55:19


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

1. Inode

2.Data blocks

3.File blocks

4.Directory file

Posted Date:-2021-06-28 14:55:19


Question:
 All device files are stored in which directory?

1./etc

2./bin

3./dev

4./usr

Posted Date:-2021-06-28 14:55:19


Question:
Binary or executable files are:

1.Regular files

2.Device files

3.Special files

4.Directory files

Posted Date:-2021-06-28 14:55:19


Question:
Effective group id can be set using following permission

1.0777

2.2666

3.4744

4.1711

Posted Date:-2021-06-28 14:55:19


Question:
Effective user id can be set using following permission

1.0777

2.2666

3.4744

4.1711

Posted Date:-2021-06-28 14:55:19


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

1.Error message indicating the user cant access beyond the root level

2.Behavior is unix-flavor dependent

3.Results in changing to the home directory

4.Nothing happens

Posted Date:-2021-06-28 14:55:19


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

1.no you cannot add a file to example.tar

2.tar -cvf example.tar file1

3.tar -rvf file1 example.tar

4.tar -evf file1 example.tar

Posted Date:-2021-06-28 14:55:19


Question:
How do you rename file new to file old ?

1.mv new old

2.move new old

3.cp new old

4.rn new old

Posted Date:-2021-06-28 14:55:19


Question:
How to execute ls command inside a vi editor?

1.!ls

2.ls

3.:!ls

4.we can’t execute

Posted Date:-2021-06-28 14:55:19


Question:
If a file is removed in Unix using rm then

1.The file can be recovered by a normal user

2.The file cannot be recovered by a user

3.The file can be fully recovered provided the sytem is not rebooted

4.The file will be moved to /lost+found directory and can be recovered only by administrator’s intervention

Posted Date:-2021-06-28 14:55:19


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

1.777

2.775

3.774

4.664

Posted Date:-2021-06-28 14:55:19


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

1.The file is removed successfully (and silently)

2.The rm command prompts for a confirmation, the command is successful upon confirmation

3.The rm command prompts for a confirmation, however the operation fails because of insufficient permissions

4.The rm command fails because of insufficient permissions

Posted Date:-2021-06-28 14:55:19


Question:
pwd command displays

1.user password

2.password file content

3.present working directory

4.none of the mentioned

Posted Date:-2021-06-28 14:55:19


Question:
sed is a command typically used for

1.Perform complex calculations

2.Perform FIFO based non-blocking I/O

3.Modify/print selective contents of a file

4.None of the mentioned

Posted Date:-2021-06-28 14:55:19


Question:
srwxr-xrw- is a

1.internet socket file

2.unix domain socket file

3.symbolic link

4.shared file

Posted Date:-2021-06-28 14:55:19


Question:
Sticky bit can be set using following permission

1.777

2.2666

3.4744

4.1711

Posted Date:-2021-06-28 14:55:19


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

1.man sample.txt>more

2.cat sample.txt<more

3.cat sample.txt|more

4.none of the mentioned

Posted Date:-2021-06-28 14:55:19


Question:
The directory file contains:

1.File names & File Sizes

2.File names & Inode Numbers

3.File names & Address

4.File names & Permissions

Posted Date:-2021-06-28 14:55:19


Question:
The file permission 764 means:

1.Every one can read, group can execute only and the owner can read and write

2.Every one can read and write, but owner alone can execute

3.Every one can read, group including owner can write, owner alone can execute

4.Every one can read and write and execute

Posted Date:-2021-06-28 14:55:19


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

1. 0777

2.2666

3.4744

4.4644

Posted Date:-2021-06-28 14:55:19


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

1.0777

2.2766

3.2744

4.2754

Posted Date:-2021-06-28 14:55:19


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

1.777

2.1755

3.1754

4.2754

Posted Date:-2021-06-28 14:55:19


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

1.777

2.666

3.744

4.711

Posted Date:-2021-06-28 14:55:19


Question:
To open a file file1 with cursor at line number 4

1.vi +num file1

2.vi +set num file1

3.vi + set num file1

4.vi +/se nu file1

Posted Date:-2021-06-28 14:55:19


Question:
What command is used to copy files and directories?

1.copy

2.cp

3.rn

4.cpy

Posted Date:-2021-06-28 14:55:19


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

1.talk

2.write

3.chat

4.transmit

Posted Date:-2021-06-28 14:55:19


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

1.chmod –r +x /home/user1/direct

2.chmod –R +x /home/user1/direct

3.chmod –f –r +x /home/user1/direct

4.chmod –F +x /home/user1/direct

Posted Date:-2021-06-28 14:55:19


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

1.f1

2.f2

3.new inode will be used

4.no inode is freed

Posted Date:-2021-06-28 14:55:19


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

1.a file is created that points to an existing file

2.a file is created that is a copy of an existing file

3.a file is moved from one location to another

4.a file is renamed

Posted Date:-2021-06-28 14:55:19


Question:
Which are the two types of device files?

1.Character & Block

2.Character & Socket

3.Block & FIFO

4.Input & output

Posted Date:-2021-06-28 14:55:19


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

1.diff

2.cmp

3.comm

4.ls -a

Posted Date:-2021-06-28 14:55:19


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

1.ls –aR

2.ls –a

3.ls –R

4.Is –l

Posted Date:-2021-06-28 14:55:19


Question:
Which command is used to set limits on file size

1.fsize

2.flimit

3.ulimit

4.usize

Posted Date:-2021-06-28 14:55:19


Question:
Which command will you use to see the available routes?

1.show route

2.route status

3.netstat -r

4.none of the mentioned

Posted Date:-2021-06-28 14:55:19


Question:
Which directory contain device special files?

1./etc

2./etc/dev

3./root/bin

4./dev

Posted Date:-2021-06-28 14:55:19


Question:
Which is an example for block special file?

1.Virtual Terminal

2.CD-ROM

3.Terminal

4.Serial modem

Posted Date:-2021-06-28 14:55:19


Question:
Which is an example for character special file?

1.Hard disk

2.CD-ROM

3.Terminal

4.Memory

Posted Date:-2021-06-28 14:55:19


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

1.Chmod

2.Chown

3.Umask

4.Chgrp

Posted Date:-2021-06-28 14:55:19


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

1.ssh

2.telnet

3.rsh

4.ftp

Posted Date:-2021-06-28 14:55:19


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

1.touch

2.grep

3.find

4.ls

Posted Date:-2021-06-28 14:55:19


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

1.Socket

2.Softlink

3.Inode

4.FIFO

Posted Date:-2021-06-28 14:55:19


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

1.Hard links share same inode number

2.Soft links cannot be created across partitions

3.Socket files are Unix domain sockets

4.Character file is a special file

Posted Date:-2021-06-28 14:55:19


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

1.Access Time

2.Modification Time

3.Creation Time

4.Change Time

Posted Date:-2021-06-28 14:55:19


Question:
Which one shows the name of the operating system?

1.uname -n

2.uname -r

3.uname -o

4.uname –m

Posted Date:-2021-06-28 14:55:19


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

1.–b

2.–o

3.–p

4. –t

Posted Date:-2021-06-28 14:55:19


Question:
Which represents the user home directory

1. /

2. .

3...

4. ~

Posted Date:-2021-06-28 14:55:19


Question:
Which screen manipulation command sets the screen back to normal?

1.tput cup

2.tput smso

3.tput rmso

4.tput blink

Posted Date:-2021-06-28 14:55:19


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

1.cvf

2.tvf

3.xvf

4.ovf

Posted Date:-2021-06-28 14:55:19


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

1.date +%d/%m/%Y

2.date +”%d/%m/%Y”

3.date +/%d/%m/20%y

4.date +”/%d/%m/20%y”

Posted Date:-2021-06-28 14:55:19


More MCQS

  1. Unix MCQS Set 1
  2. Unix MCQS Set 2
  3. Unix MCQS Set 3
  4. Unix MCQS Set 4
  5. Linux Mcqs Questions Set 1
  6. Linux Mcqs Questions Set 2
  7. Linux Mcqs Questions Set 3
  8. Linux Mcqs Questions Set 4
  9. Linux Mcqs Questions Set 5
  10. Linux Mcqs Questions Set 6
  11. Linux Mcqs Questions Set 7
  12. Linux Mcqs Questions Set 8
  13. Linux Mcqs Questions Set 9
  14. Linux Mcqs Questions Set 10
  15. Linux Mcqs Questions Set 11
  16. Linux Mcqs Questions Set 12
  17. Linux Mcqs Questions Set 13
  18. Linux Mcqs Questions Set 14
  19. Unix MCQ Set 01
  20. Unix MCQ Set 02
  21. UNIX SYSTEM Mcq
  22. Unix MCQ
  23. Linux MCQ Unit 1
  24. Linux MCQ Unit 2
  25. LINUX MCQ QUESTIONS AND ANSWER
  26. Linux File Permissions MCQ Questions Answers
  27. Linux Administration MCQ question and answer
  28. Linux MCQ QUESTIONS AND ANSWER
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!