Unix/Lunux/Unix MCQ Set 01 Sample Test,Sample questions

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

1.:pat

2.?pat

3./pat

4.None of the above

Posted Date:-2021-11-22 11:23:06


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

1.mesg

2.grep

3.halt

4.sleep

Posted Date:-2021-11-22 11:21:45


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

1.tee

2.tr

3.sort

4.grep

Posted Date:-2021-11-22 11:15:52


Question:
 The cp command uses:

1.Standard input file

2.Standard output file

3.Both input and output file

4.Neither standard input nor standard output file

Posted Date:-2021-11-22 10:54:54


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

1. Second

2.Fourth

3.Third

4.First

Posted Date:-2021-11-22 15:02:21


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

1.cut sales empl.lst

2./sales > empl.lst

3.grep sales empl.lst

4.cat | /sales > empl.lst

Posted Date:-2021-11-22 10:57:40


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

1.chgrp

2.chown

3.chmod

4.chusr

Posted Date:-2021-11-22 17:35:50


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

1.s

2.S

3.a

4.i

Posted Date:-2021-11-22 10:37:14


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

1.cd..

2.cd

3.cd

4.cd HOME

Posted Date:-2021-11-22 17:28:33


Question:
 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?

1.chmod 761 note

2.chmod 671 note

3.chmod 167 note

4.chmod 4=rwx, g=rw note

Posted Date:-2021-11-22 15:39:00


Question:
 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?

1.chmod 761 note

2.chmod 671 note

3.chmod 167 note

4.chmod 4=rwx, g=rw note

Posted Date:-2021-11-22 15:39:16


Question:
 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?

1.chmod 761 note

2.chmod 671 note

3.chmod 167 note

4.chmod 4=rwx, g=rw note

Posted Date:-2021-11-22 15:39:16


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

1. chmod g+x note

2.chmod u+w note

3. chmod u+x note

4.chmod ugo+x note

Posted Date:-2021-11-22 11:20:34


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

1.cd

2.changedir

3.chdir

4.cdir

Posted Date:-2021-11-22 11:24:12


Question:
 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?

1. find -mtime +365 | rm

2.grep (/usr/*) - mtime + 365 | -ok rm

3.find -name - mtime + 365 / - ok rm

4.find /user/* (-mtime + 365 - a - atime +365 ) - OK rm {} ;

Posted Date:-2021-11-22 17:18:15


Question:
 Which of the following is not a filter?

1.cat

2.grep

3.wc

4.None of the above

Posted Date:-2021-11-22 15:17:26


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

1. -l

2. -i

3. -x

4.-R

Posted Date:-2021-11-22 11:07:11


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

1. -m.n

2.+m.n

3.+ n.m+1

4.+(m+l).n

Posted Date:-2021-11-22 15:07:16


Question:
The % key allows you

1.To move the cursor to a matching delimiter, when a delimiters a parenthesis, a bracket, or a brace

2.To move the cursor to the upper left corner of the screen

3. To move the cursor backward to the beginning of a word

4.To move the cursor to the first column in the current line

Posted Date:-2021-11-22 11:26:37


Question:
The cat command is used to

1.Capture a file

2.Display a file

3.Print a file

4.Print a file

Posted Date:-2021-11-22 10:41:40


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

1.executable permission only

2.Write and executable permissions

3.Write and executable permissions

4.Both read and write permissions

Posted Date:-2021-11-22 10:21:19


Question:
The ls -l command tells

1. Who the owner of the file is

2.The name of the group owner of the file

3.How large the file is and when the file was last modified

4.All of the above

Posted Date:-2021-11-22 15:08:27


Question:
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:

1. 000

2.755

3.744

4.555

Posted Date:-2021-11-22 10:39:41


Question:
The octal representation 652 indicates

1.Execute permission for the owner

2.Write permission for others

3.Read and write permission of groups

4.None of the above

Posted Date:-2021-11-22 11:18:23


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

1.Group has read permission only (B) (C) (D)

2.Other has read permission only

3.Owner has read permission only

4.Group has write permission only

Posted Date:-2021-11-22 17:30:20


Question:
The special shell variable $* is used

1.To exit status of last command executed

2.To process number of the current shell

3. To list the positional parameters

4. To name the command being executed

Posted Date:-2021-11-22 11:09:10


Question:
The UNIX file system stores a data in physical blocks of

1. 1024 bytes

2.2048 bytes

3.512 bytes

4.256 bytes

Posted Date:-2021-11-22 15:09:24


Question:
The [line number G] key allows you

1.To move cursor left by one position

2.To move cursor right by one position

3.To move cursor down by one line

4. To move cursor to the beginning of the line specified by the number

Posted Date:-2021-11-22 11:01:22


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

1. chmod go+r note

2.chmod a-rw

3.chmod ugo=r note

4. chmod u+r,g+r,o-x note

Posted Date:-2021-11-22 15:40:58


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

1.copy programs/wb misc/wb

2.cp programs/wb misc

3.tar programs/wb misc/wb

4.copy a:programs/wb b:misc/wb

Posted Date:-2021-11-22 17:26:23


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

1.cp chap?? progs

2.cp chap* progs

3.cp chap[12] /progs/*.*

4.cp chap?? /progs/*

Posted Date:-2021-11-22 10:35:50


Question:
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?

1.copy wb ../misc collect ../misc mon ../misc

2.cp wb collect mon ../misc

3. copy wb collect mon /misc

4.tar wb collect mon /misc

Posted Date:-2021-11-22 11:27:53


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

1. wc - 1

2. wc -c

3. wc -w

4.wc -r

Posted Date:-2021-11-22 10:42:34


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

1.cd

2.od

3.of

4.oct

Posted Date:-2021-11-22 15:47:10


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

1. head - r

2.tail

3. eof

4.bof

Posted Date:-2021-11-22 10:43:51


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

1.cat

2.cut

3.grep

4.paste

Posted Date:-2021-11-22 15:16:11


Question:
Which command is used to link the files?

1. lk

2.ln

3.cp

4.tar

Posted Date:-2021-11-22 17:20:42


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

1. ls -l

2. ls -x

3. ls -F

4.ls -a

Posted Date:-2021-11-22 11:16:55


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

1. ls profile

2.find /-name profile -print

3.cd /.profile

4. l -u .profile

Posted Date:-2021-11-22 10:56:17


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

1.chmod -R a+x progs

2.chmod -R 222 progs

3. chmod -1 a+x progs

4. chmod -x a+x progs

Posted Date:-2021-11-22 11:32:43


Question:
Which command is used to remove a file?

1.remove

2.rm

3.mv

4.del

Posted Date:-2021-11-22 15:37:22


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

1. more

2.cat

3.grep

4.tee

Posted Date:-2021-11-22 10:34:40


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

1.sort

2.sh

3.st

4. sort -r

Posted Date:-2021-11-22 11:34:38


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

1. sort

2.sh

3.st

4.sort -r

Posted Date:-2021-11-22 15:10:52


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

1.kill 1

2.kill-o

3.cancel all

4. cancel 1

Posted Date:-2021-11-22 10:29:36


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

1. :q

2.w

3.q!

4.:x

Posted Date:-2021-11-22 17:15:57


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

1. wc infile >newfile

2.wc <infile >newfile

3.wc infile - newfile

4.wc infile | newfile

Posted Date:-2021-11-22 11:05:41


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

1.A

2.a

3.i

4. l

Posted Date:-2021-11-22 11:31:14


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

1.shell

2.Korn shell

3.Bourne shell

4.Smith shell

Posted Date:-2021-11-22 15:04:48


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

1.r user-list

2.m user-list

3.d user-list

4.e user-list

Posted Date:-2021-11-22 15:15:25


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

1.write

2.mesg

3.calendar

4.mail

Posted Date:-2021-11-22 10:46:57


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

1.write

2.mail

3.wall

4.mesg

Posted Date:-2021-11-22 17:17:06


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

1.wc -l

2.wc -c

3.wc -w

4.wc -r

Posted Date:-2021-11-22 15:20:45


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

1.wc -l

2.wc -c

3.wc -w

4.wc -r

Posted Date:-2021-11-22 15:18:24


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

1.which

2.who

3.who am

4.1 /u

Posted Date:-2021-11-22 15:13:49


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

1.who am i

2. i /4

3.pwd

4.which

Posted Date:-2021-11-22 10:49:33


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

1.cp

2.cpio

3.cp - p

4.copy

Posted Date:-2021-11-22 15:30:34


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

1.cp

2.cpio

3.cp - p

4.copy

Posted Date:-2021-11-22 15:34:59


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

1. count p

2.wc

3.wcount

4.countw

Posted Date:-2021-11-22 17:14:20


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

1.dir

2.prompt $p$g

3.pwd

4.path

Posted Date:-2021-11-22 10:30:39


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

1.cd

2.cd ..

3.cd/

4.chdir

Posted Date:-2021-11-22 10:40:40


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

1. ls

2.cat

3.file

4.more

Posted Date:-2021-11-22 17:23:07


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

1.ls

2.lp

3.dir

4.tar

Posted Date:-2021-11-22 11:19:25


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

1.ls -1

2.ls -t

3.ls -i

4.ls -r

Posted Date:-2021-11-22 10:26:35


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

1. rename

2.remove

3.mv

4.ren

Posted Date:-2021-11-22 10:33:32


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

1.Shadow

2.Password

3.Profile

4. All the three

Posted Date:-2021-11-22 11:00:04


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

1.patch

2.catch

3.ch

4.All of the above

Posted Date:-2021-11-22 15:19:06


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

1.patch

2.catch

3.ch

4. All of the above

Posted Date:-2021-11-22 15:23:56


Question:
Which of the following is invalid filename?

1.shutry

2.TRY

3.trial

4.None of the above

Posted Date:-2021-11-22 15:27:58


Question:
Which of the following is not a communication command?

1.write

2.mesg

3.mail

4.grep

Posted Date:-2021-11-22 11:11:05


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

1. x

2.X

3.dd

4.D

Posted Date:-2021-11-22 10:52:33


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

1. [ijk]

2.!ijk]

3.?

4. *

Posted Date:-2021-11-22 15:01:29


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

1. @

2.#

3.$

4.!

Posted Date:-2021-11-22 11:14:40


Question:
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?

1.-l

2.-d

3. -r

4. -b

Posted Date:-2021-11-22 11:25:13


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

1.-t

2.-tt

3.-4

4.-i

Posted Date:-2021-11-22 10:27:44


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

1.nm

2.nu

3. ic

4. li

Posted Date:-2021-11-22 11:13:13


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

1.^pat

2.$pat

3.pat$

4.pat^

Posted Date:-2021-11-22 10:38:48


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

1.s

2.r

3.w

4.d

Posted Date:-2021-11-22 10:48:13


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

1.> symbols

2.>> symbols

3. < symbols

4.<< symbols

Posted Date:-2021-11-22 15:05:50


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

1.> symbols

2.>> symbols

3. < symbols

4.<< symbols

Posted Date:-2021-11-22 15:05:51


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!