» Linux » Examen sur Linux » Examen 201 : Advanced Administration » Section 3 » Question 13/20
13.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?

fc -l find <enter> n
history -l find <enter> history n
Retype the command
fc -n find

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.

« Question 12 Question 14 »