System Management
An administrator runs mkdir -p /srv/projects/alpha and then wants to change into that new directory without retyping the path. Which command does this using history expansion?
Show the answer
Correct answerD. cd !$
!$ expands to the last argument of the previous command, here /srv/projects/alpha. !^ expands to the first argument, which is -p, so cd would fail. !* inserts all arguments, and !! inserts the whole previous command.