Posts

Showing posts from June, 2018

How to delete 'n' number if commands executed from bash history

For deleting 'n' number of commands frm bash history, first type history command in shell, #history for example if you need to delete commands from line 520 to line 637 . execute the command as follows. #for h in $(seq 520 637 | tac); do history -d $h; done thats it.