this set of linu1

8
This set of Linux / Unix multiple choice questions and answers focuses on various Linux commands and their command line options & parameters. It will be useful for anyone learning Linux Basics, Essentials and/or Fundamentals. 1. The dmesg command a) Shows user login logoff attempts b) Shows the syslog file for info messages c) kernel log messages d) Shows the daemon log messages View Answer Answer:c 2. The command “mknod myfifo b 4 16” a) Will create a block device if user is root b) Will create a block device for all users c) Will create a FIFO if user is not root d) None of the above View Answer Answer:a 3. Which command is used to set terminal IO characteristic? a) tty b) ctty c) ptty d) stty View Answer Answer:d 4. Which command is used to record a user login session in a file a) macro b) read c) script d) none of the above View Answer Answer:c 5. Which command is used to display the operating system name a) os b) Unix c) kernel d) uname View Answer Answer:d 6. Which command is used to display the unix version a) uname -r

Upload: printesh-patel

Post on 16-Nov-2015

213 views

Category:

Documents


0 download

DESCRIPTION

linux set 1

TRANSCRIPT

This set of Linux / Unix multiple choice questions and answers focuses on various Linux commands and their command line options & parameters. It will be useful for anyone learning Linux Basics, Essentials and/or Fundamentals.1. The dmesg commanda) Shows user login logoff attemptsb) Shows the syslog file for info messagesc) kernel log messagesd) Shows the daemon log messagesView AnswerAnswer:c2. The command mknod myfifo b 4 16a) Will create a block device if user is rootb) Will create a block device for all usersc) Will create a FIFO if user is not rootd) None of the aboveView AnswerAnswer:a3. Which command is used to set terminal IO characteristic?a) ttyb) cttyc) pttyd) sttyView AnswerAnswer:d4. Which command is used to record a user login session in a filea) macrob) readc) scriptd) none of the aboveView AnswerAnswer:c5. Which command is used to display the operating system namea) osb) Unixc) kerneld) unameView AnswerAnswer:d6. Which command is used to display the unix versiona) uname -rb) uname -nc) uname -td) kernelView AnswerAnswer:a7. Which command is used to print a filea) printb) ptrc) lprd) none of the aboveView AnswerAnswer:c8. Using which command you find resource limits to the session?a) rlimitb) ulimitc) setrlimitd) getrlimitView AnswerAnswer:b9. Which option of ls command used to view file inode numbera) lb) -oc) ad) iView AnswerAnswer:d10. find / -name * willa) List all files and directories recursively starting from /b) List a file named * in /c) List all files in / directoryd) List all files and directories in / directoryView AnswerAnswer:aThis set of Linux / Unix questions and answers focuses on variousLinux administrationcommands. It will be useful for anyone learning basicLinux Administration.1. Which command is used to display the octal value of the texta) octalb) text_octc) octd) odViewAnswerAnswer:d2. Which command is used toviewcompressed text file contentsa) catb) typec) zcatd printViewAnswerAnswer:c3. Which command changes a files group ownera) cgrpb) chgrpc) changed) groupViewAnswerAnswer:b4. Which command is used to extractintermediateresult in a pipelinea) teeb) extractc) execd) none of the aboveViewAnswerAnswer:a5. Which command is used to extract a column from a text filea) pasteb) getc) cutd) tarViewAnswerAnswer:c6. Which command is used to display disk consumption of a specific directorya) dub) dsc) ddd) ddsViewAnswerAnswer:a7. Which command is used to perform backup in unix?a) backupb) cpioc) zipd) gzipViewAnswerAnswer:b8. Which command creates an empty file if file does not exist?a) catb) touchc) edd) readViewAnswerAnswer:b9. Which option of rm command is used to remove a directory with all its subdirectoriesa) bb) oc) pd) rViewAnswerAnswer:d10. Which command is used to identify file type?a) Typeb) Filec) Finfod) InfoViewAnswerAnswer:bThis set of Linux / Unixquestions and answersfocuses on various Unix administration commands. It will be useful for anyone learning basic Unix Administration.1. Command used to determine the path of an executable file isa) whichb) wherec) wexecd) whatViewAnswerAnswer:a2. Command used to count number of character in a file isa) grepb) wcc) countd) cutViewAnswerAnswer:b3. Which of these commands could you use to showone pageof output at a time?a) lessb) sedc) paused) grepViewAnswerAnswer:a4. Which commands will give you information about how much disk space each file in the current directory uses?a) ls -lb) ls -lac) dud) ls -aViewAnswerAnswer:c5. Which of the following command output contains userid?a) lsb) helpc) dated) ls lViewAnswerAnswer:d6. Which command is used to display all the files including hidden files in your current and its subdirectories ?a) ls aRb) ls ac) ls Rd) ls lViewAnswerAnswer:a7. Which of the following commands can be used tocopy filesacross systems?a) sshb) telnetc) rshd) ftpViewAnswerAnswer:d8. pwd command displaysa) user passwordb) password file contentc) present working directoryd) none of the mentionedViewAnswerAnswer:c9. Which of the following commands can be used to change default permissions for files and directories at the time of creationa) Chmodb) Chownc) Umaskd) ChgrpViewAnswerAnswer:c10. Which tar command option is used to list the files in a tape archive format?a) cvfb) tvfc) xvfd) ovfViewAnswerAnswer:b11. Which of the following commands will allow the user to search contents of a file for a particular patterna) touchb) grepc) findd) lsViewAnswerAnswer:bThis set of Linux / Unix questions and answers is useful for campus and walk-in interviews as well as placements.1. Write the command to display thecurrent datein the form dd/mm/yyyy.a) date +%d/%m/%Yb) date +%d/%m/%Yc) date +/%d/%m/20%yd) date +/%d/%m/20%yViewAnswerAnswer:a2. The commandsyntaxto displaythe filesample.txtone pageat a time isa) man sample.txt>moreb) cat sample.txt