Today i wanted to delete some lines from my shell history in a TrueNAS jail as i exported some vars with sensible information.
As i do this in bash on a linux system with the command
history -d IndexOfEntry
i fired this up in the csh and it …. did not work :-(
The history command in csh does not seem to have a index delete function ….
After a quick search on the net someone came up with this:
history -S # saves the current history
nano ~/.history # edit the history file with your
favourite editor and delete the
appropriate entries
history -c # clear the history
history -L # load the edited history
This worked like a charm and the passwords are gone from the history.