Home » LPI » 117-201 » What would be the quickest way to do this?
You previously ran the find command to locate a particular file. You want to run that command again. What would be the quickest way to do this?
A. fc -l find <enter> n
B. history -l find <enter> history n
C. Retype the command
D. fc -n find
Correct Answer: A
Explanation/Reference:
Explanation: The -l option used with the fc command is used to list the commands saved in the ‘history’. The ‘fc -l find’ command will display all recent commands starting with the word ‘find’. After pressing enter, the list is displayed and you can recall the command by entering the number (n) of the command.
Reference: http://www.computerhope.com/unix/uhistory.htm
Incorrect Answers
B:The syntax of the ‘history’ command is wrong.
C:Whether it would be quicker to retype the command or not depends on the name of file you were looking for previously. It is unlikely that this is a trick question, so the answer would be to use the fc command.
D:The ‘fc -n find’ command would display the recent ‘find’ commands, but without the command numbers. It would not run the required command.
Download Printable PDF. VALID exam to help you PASS.
|
|