Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed the history file shredding problem #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions assets/scripts/log_killer
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

start_log_killer(){

log_list=( "/var/log/messages" "/var/log/auth.log" "/var/log/kern.log" "/var/log/cron.log" "/var/log/maillog" "/var/log/boot.log" "/var/log/mysqld.log" "/var/log/secure" "/var/log/utmp" "/var/log/wtmp " "/var/log/yum.log" "/var/log/system.log" "/var/log/DiagnosticMessages" "~/.zsh_history" "~/.bash_history")

for log in ${log_list[@]}; do
for log in `cat ../sources/log_list`; do
if [ -f "$log" ];then
shred -vfzu $log && :> $log
fi
Expand Down
9 changes: 9 additions & 0 deletions assets/sources/log_list
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/var/log/*.log
/var/log/messages
/var/log/maillog
/var/log/secure
/var/log/utmp
/var/log/wtmp
/var/log/DiagnosticMessages
/root/.*history
/home/*/.*history