Timeline for How to delete history of last 10 commands in shell?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 18, 2022 at 20:58 | comment | added | alchemy |
this was working, but now I get "bash: history: -10: history position out of range"..I even get that error with history -d -2 .. I wonder why. This worked for me.. it deletes the last entry hdl() { history -d $(($HISTCMD - $1))-$(($HISTCMD - 2)) ;} unix.stackexchange.com/a/573258/346155
|
|
Dec 31, 2019 at 4:47 | history | edited | David Hatch | CC BY-SA 4.0 |
added 69 characters in body
|
Jan 17, 2019 at 0:49 | history | edited | David Hatch | CC BY-SA 4.0 |
deleted 38 characters in body
|
Jan 16, 2019 at 20:07 | history | edited | David Hatch | CC BY-SA 4.0 |
added 282 characters in body
|
Jan 16, 2019 at 19:55 | review | Late answers | |||
Jan 16, 2019 at 20:01 | |||||
Jan 16, 2019 at 19:38 | history | answered | David Hatch | CC BY-SA 4.0 |