Which one of the following command shows the last 50 commands the user has entered.
-
fc -l 50
-
fc -l -50
-
history 50
-
history $$
B
Correct answer
Explanation
The 'fc' (fix command) builtin lists command history. 'fc -l -50' displays the last 50 commands from history (negative offset means 'count back from most recent'). Option A 'fc -l 50' would show commands 50 onward from the oldest. Option C 'history 50' is a bash-specific command not in ksh, and Option D '$$' is the current PID.