Home > Back-end >  Cannot delete a particular command in history file
Cannot delete a particular command in history file

Time:08-11

I saw someone say can type history -d<line number> to delete particular command, but when I type history -d<17> want to delete line 17 which is named history, the system say syntax error near unexpected token '17'. So, how can i solve it? enter image description here

CodePudding user response:

The right syntax is:

history -d 17

If you type history --help you'll see that:

-d offset — delete the history entry at position OFFSET
  • Related