Unix/Lunux/Unix MCQS Set 1 Sample Test,Sample questions

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


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

1.write

2.mesg

3.mail

4.grep


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


Question:
  
If you are to use [Control-c] as the interrupt key instead of [Del], then you will have to use

1.tty ^c

2.stty intr ^c

3. stty echoe

4.stty echo ^a


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

1.group has read permission only

2.other has read permission only

3.owner has read permission only

4.group has write permission only


Question:
  
Which command is used to remove a file?

1.remove

2.rm

3.mv

4.del


Question:
  
Which command is used to remove the read permission of the file 'note' from both the group and others?

1.chmod go+r note

2. chmod go+rw note

3.chmod go-x note

4.chmod go-r note


Question:
  
Which command will be used with vi editor to insert text to left of cursor?

1.s

2.S

3.a

4.i


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

1.write

2.mail

3.wall

4.mesg


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

1.patch

2.catch

3..ch

4.All of the above


Question:
  
Which of the following keys is used to replace a single character with new text?

1.sort

2.s

3.r

4.C


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

1.:pat

2.?pat

3./pat

4.All of the above


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

1.^pat

2.$pat

3.pat$

4.pat^


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 upperleft 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


Question:
The agency that sits between the user and the UNIX system is called the

1.logic

2.profile

3.shell

4.erxc


Question:
The command used to compare the files is known as

1.comp

2.cmp

3.do

4.ccp


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


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


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

1.0

2.755

3.744

4.555


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

1.dir

2.prompt $p$g

3.pwd

4.path


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


Question:
Which command is used to change protection mode of files starting with the string emp and ending with 1,2, or 3?

1.chmod u+x emp[1-3]

2.chmod 777 emp*

3.chmod u+r ??? emp

4.chmod 222 emp?


Question:
Which command is used to concatenate all files beginning with the string 'emp' and followed by a non-numeric characters?

1.cat emp[!0-9]

2. more [emp][!0-9]

3.cat emp[x-z]

4.cat emp[a-z]


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/*


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


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

1.cd

2.od

3.of

4.oct


Question:
Which command is used to display and create files?

1.cat

2.vi

3.ed

4.lyrix


Question:
Which command is used to display the characteristics of a process?

1.pid

2.du

3.ps

4.au


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

1.cat

2.head

3.more

4.grep


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

1.cat

2.cut

3.grep

4.paste


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


Question:
Which command is used to remove a directory?

1.rd

2.rmdir

3.dldir

4.rdir


Question:
Which command is used to sort the 

1.sort

2.sh

3.st

4.sort -r


Question:
Which command is used to terminate a process?

1.shutdown

2.haltsys

3.cancel

4.kill


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


Question:
Which of the following commands is used to display the directory attributes rather than its contents?

1. ls -l -d

2.ls -l

3.ls -x

4. ls -F


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

1.Is

2.cat

3.file

4.more


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

1.ls

2.lp

3.dir

4.tar


Question:
Which of the following commands is used to update access and modification times of a file?

1.grep

2.wc

3.touch

4.cat


Question:
Which of the following directories contain all the Alias created by a user, including his login 

1./tmp

2./etc

3./usr

4./dev


Question:
Which of the following keys is used to move the cursor to the end of the paragraph.

1.}

2.{

3.|

4.$


Question:
Which of the following special shell variables is used to process number of the last background job?

1.$!

2.$#

3.$0

4.$*


Question:
Which option will be used with touch command to change the access time?

1.a

2.b

3.t

4.h


Question:
Which symbol is used to separate more than one command in the same command line?

1.$

2.#

3.:

4.;


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!