Bird
0
0

Given the following history output:

medium📝 Command Output Q13 of 15
Linux CLI - Environment and Configuration
Given the following history output:
  100  ls -l
101 git status
102 cd projects
103 git commit -m 'fix'

What command will run if you type !git?
Agit commit -m 'fix'
Bgit status
Cls -l
Dcd projects
Step-by-Step Solution
Solution:
  1. Step 1: Identify last command starting with 'git'

    From history, commands 101 and 103 start with 'git'. The last one is 103: git commit -m 'fix'.
  2. Step 2: Understand !git runs last matching command

    !git reruns the most recent command starting with 'git', which is command 103.
  3. Final Answer:

    git commit -m 'fix' -> Option A
  4. Quick Check:

    !string runs last command starting with string [OK]
Quick Trick: !string runs last command starting with string [OK]
Common Mistakes:
  • Choosing first matching command instead of last
  • Confusing command numbers with commands
  • Selecting unrelated commands

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes