Name: CS520 Quiz Review Questions 02/2016 Student ID: Note: You are allowed to use your computer and internet during the test 1. Which bash command displays helpful information about builtin commands a. help b. helps c. man d. manual e. None of he above 2. Which bash command displays manual page about bash commands a. help b. helps c. man d. manual e. None of he above 3. Commands that can be executed within the running shell’s process is called builtin commands. a. True b. False 4. Which of the following lists the content in the current directory and sort the files by the time modified (most recently modified first): a. b. c. d. e. 5. ls ls -l ls -lt ls -lS None of the above Which of the following lists the content in the current directory and sort the files by size (biggest first): a. b. c. d. e. ls ls -l ls -lt ls -lS None of the above 6. How do you see files’ sizes in byte, kilobyte, megabyte, gigabyte, terabyte…? a. ls -l b. ls -lh c. ls -lt d. ls -lS e. None of the above 7. Which bash command is used to change the owner of a file? a. chmod b. chown c. changeown d. changeowner e. None of the above 8. Which bash command is used to change a file’s user access permissions ? 1 a. b. c. d. e. 9. chmod chown changeown changeowner None of the above Which bash command is used to search a keyword from input files? a. search b. keyword c. grep d. ls e. None of the above 10. The bash command mv is ONLY used to move a file to an existing directory a. True b. False 11. Which bash command is used to list process status? a. process -ef b. ps -ef c. ls -ef d. pwd -ef e. None of the above 12. To terminate a running process in linux, you can use terminate command a. True b. False 13. Which bash command is used to change the permission of all the files under current directory to rwxr--r-- (b) a. b. c. d. e. chmod 777 * chmod 744 * chmod 751 * chmod 761 * None of the above 14. What does the command “cd” do if you do not give any options: a. Go to current directory b. Go to upper directory c. Go to home directory d. Go to root directory e. None of above 15. If I use command cd .., it always goes up one directory (parent directory). The only exception is when you are at the system root directory /. a. True b. False 16. The pwd command prints the working directory path and name a. True b. False 17. What is the command wc used for? a. word count b. line count 2 c. d. e. character count byte count All of the above 18. Use du –h to display disk free space, human readable a. True b. False 19. Use df –h to display disk usage of folder, human readable a. True b. False 20. Bash command cat is used to a. Show content of a file b. Show the cute cat animal nature of a file c. Display the name of a file d. Print out the absolute path of a file e. All of the above 21. If you want to delete a directory tmp, which of the following is correct? a. rm tmp b. rm –r tmp c. rm –fr tmp d. All of a, b, c e. Both b and c 22. The bash command mkdir is used to create a new directory a. True b. False 23. The bash command touch is used to create an empty file a. True b. False 24. The w command is used to display who is logged on and what they are doing a. True b. Fasle 25. The bash command used to copy a file is a. copy b. cp c. move d. mv e. All of the above 26. The bash command id is used to display user’s identity a. True b. False 27. To run a command as super user root, you use sudo a. True b. False 28. If you have changed your port number for nginx or apache web server to 8888, and your domain name is localhost, you should access your web site using: a. http://localhost:80 3 b. c. d. e. http://localhost:88 http://localhost:888 http://localhost:8888 http://localhost:3306 29. The Web server stores all of the files necessary to display web pages at a specific directory path on the Web server machine -- typically all the individual pages that comprise the entirety of a Web site, any images/graphic files and any scripts (such as PHP) that make dynamic elements of the site function. The specific directory path can not be changed. a. True b. False 30. DHTML is the combination of a. HTML b. JavaScript c. CSS d. HTML DOM e. All of the above 31. Choose the correct HTML tag for the largest heading a. <h6> b. <h1> c. <head> d. <heading> e. <title> 32. What is the correct HTML tag for inserting a line break? a. <break /> b. <hr /> c. <br /> d. <lib /> e. <newline /> 33. Which one is correct to create a hyperlink to w3schools.com ? a. <a url=” w3schools.com> w3schools.com</a> b. <a url=” http://w3schools.com> w3schools.com</a> c. <a href=” w3schools.com”> w3schools.com</a> d. <a href=” http://w3schools.com”> w3schools.com</a> e. <a> href=”http://w3schools.com” </a> 34. Which of these tags are all table tags? a. <table><title><td> b. <table><tr><dt> c. <table><tr><td> d. <table><th><thead> e. <table><thead><trow> 35. Which tag is for making numbered list items? a. <ol> b. <list> c. <ul> d. <dl> e. <li> 36. What is the correct HTML for making a checkbox? 4 a. b. c. d. e. <input type=”check” /> <checkbox> <input type=”checkbox” /> <input type=”text” /> <check /> 37. What is the correct HTML for making a drop-down list? a. <select> b. <list> c. <input type=”list” /> d. <input type=”dropdown” /> e. <input type=”radio” /> 38. What is the correct HTML for making a text area? a. <textarea> b. <input type=”text” /> c. <text type=”textarea” /> d. <input type=”textarea” /> e. <input type=”textbox” /> 39. What is the correct HTML for inserting an image? a. <image href=”logo.jpg” alt=”Logo” /> b. <image src=”logo.jpg” alt=”Logo” /> c. <img href=”logo.jpg” alt=”Logo” /> d. <img src=”logo.jpg” alt=”Logo” /> e. <img alt=”Logo”>logo.jpg</img> 40. In HTML, a 6 digit Hex defines values of Green, Blue and Red in which order? a. #GGBBRR b. #RRGGBB c. #RRBBGG d. #BBGGRR e. #BBRRGG 41. What is the HTML tag for user input? a. <frame> b. <frameset> c. <form> d. <fieldset> e. <var> 42. Which attribute of the HTML form tag specifies where to send the form data when the form is submitted? a. accept b. autocomplete c. name d. target e. action 43. Which attribute of the HTML form tag specifies the HTTP method to use when sending the form data? a. accept b. method c. name d. target e. action 5 44. Which HTML tag specifies an input field where the user can enter data or submit data? a. <area> b. <article> c. <ins> d. <input> e. <link> f. 45. Which tag is used for emphasized text? a. italic b. em c. i d. p e. div 46. Inline elements are normally displayed with a new line a. True b. False 47. With HTML div tag, you can group large sections of HTML elements together and format them with CSS. The div tag a. True b. False 48. In vi, Esc key must be used to switch to command mode (a) a. b. True False 49. In vi, which keys are used to move cursor around? (e) a. b. c. d. e. hjkl wb 0$ ctr-f ctr-b All of the above 50. In vi, which of the following change the foo to bar for all lines? (a) a. b. c. d. e. In command mode, type :0,$s/foo/bar/g In command mode, type :10,20s/foo/bar/g In command mode, type :.,$s/foo/bar/g In command mode, type :.,+10s/foo/bar/g None of the above 51. In vi, if I want to save a file and exit, I first need to go to command mode, then type a. :w b. :q c. :w! d. :q! e. :wq 52. In vi, if I want to exit without saving any changes, I first need to go to command mode, then type a. :w b. :q c. :w! d. :q! 6 e. :wq 53. In vi, if I search a keyword by typing /keyword under command mode, which letter is used to search next keyword? a. N b. n c. S d. S e. None of the above 54. In vi, if you want to show the line numbers, you have to switch to command mode, then type a. :show number b. :set number c. :display number d. :list number e. None of the above 55. In vi, under command mode, I move the cursor to the line I want to start to copy, type p8p (copy 8 lines), then move the cursor to the line after which I want to copy. Which letter do I type to paste the 8 lines? a. C b. c c. P d. p e. None of the above 56. In vi, under command mode, I move the cursor to the line I want to delete, I use dd command to delete the line, or d10d to delete 10 lines after that line (including the line where cursor is at) a. True b. False 57. In vi, under command mode, use dw to delete a word a. True b. False 58. In vi, under command mode, use cw to delete a word a. True b. False 59. In vi, under command mode, type 0 to go to the beginning of that line, and $ to go to the end of the line a. True b. False 60. In vi, under command mode, type :0 to go to the beginning of first line in that file, and G to go to the last line of the file a. True b. False 7