recentpopularlog in

kme : cya   9

linux - Remove a certain line from Bash history file - Super User |
You can achieve removal from the history file using the commandline in two steps:

Typing history -d <line_number> deletes a specified line from the history in memory.
Typing history -w writes the current in-memory history to the ~/.bash_history file.

The two steps together remove the line permanently from the in-memory history and from the .bash_history file as well.
bash  history  security  cya  oops  solution  fuckina 
march 2019 by kme
Improving the security of your SSH private key files — Martin Kleppmann’s blog

olalonde • 3 days ago −
You can also prefix the command by a space in bash and it won't be saved to history.
6 •Reply•Share ›

phil olalonde • 3 days ago −
I believe this only works if you have
$ export HISTIGNORE=' *'

or add the above line to bash_profile

Ralph Ubertang Ellipsis • 4 days ago −
or just read it in as a var then unset it.
•Reply•Share ›
bestpractices  crypto  keys  security  ssh  bash  tipsandtricks  histfile  cya  essential  movein 
may 2013 by kme
David Underhill » git: forever remove files or folders from history
set -o errexit

# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2

if [ $# -eq 0 ]; then
exit 0

# make sure we're at the root of git repo
if [ ! -d .git ]; then
echo "Error: must run this script from the root of a git repository"
exit 1

# remove all paths passed as arguments from the history of the repo
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch $files" HEAD

# remove the temporary history git-filter-branch otherwise leaves behind for a long time
rm -rf .git/refs/original/ && git reflog expire --all && git gc --aggressive --prune
git  history  tipsandtricks  scm  devel  cya  sanitization 
april 2013 by kme
What The Rails Security Issue Means For Your Startup | Kalzumeus Software
"Have a plan for responding to security incidents. I call mine the Big Red Button. Thomas, a security consultant friend of mine, accurately observed that these probably caused the first Big Red Button events that many folks in the Rails community have ever had to deal with. We should learn from our experiences here.

For example: I pushed the Big Red Button at 3 AM in the morning, twice this month, to apply critical security patches and work-arounds."
rails  vulnerability  ruby  security  apocalypse  sysadmin  webmaster  securityresponse  cya 
february 2013 by kme
Disable logging to bash history temporarily : gimi's snippets
Found it!

# except that this deletes all your history
export HISTFILE=/dev/null

# This doesn't, just suspends recording history until you turn it
# back on with 'set -o history':
set +o history
bash  shell  sysadmin  tipsandtricks  solution  history  cya  dammitbrain 
december 2010 by kme

Copy this bookmark:

to read