Ubuntu – Star in Bash history

bashhistory

I'm just scrolling through all the commands i have recently used in computer which is running Ubuntu. I have found one line which looks like blank but i'm not sure about it it contains star right after the number of the command.

After using command history in terminal, It looks like this:

68 another command
69 another command
70 another command
71*
72 another command
73 another command
74 another command

what does this line mean?

71*

what command is hidden in this line ?

Best Answer

This occurs when you retrieve an entry from history list by history expansion or using arrow keys and modify the entry.

From help history:

Display the history list with line numbers, prefixing each modified entry with a `*'.

So in your case as the command field is null, you have retrieved that entry from history file/buffer and made it null by removing the command altogether i.e. the modified command will be shown.