跳到正文

回复

Tengwait

@tomychen 这个会有个问题,如果用户空按回车的时候,会获取到上一个 history 命令的内容,造成了不必要的浪费,这个问题可以解决吗

webs

供参考 https://debian.cn/topics/42#reply0

tomychen

改 /etc/profile #6 给了
patch bash

https://github.com/iamseth/bash-syslog/blob/master/bash-3.2-syslog.patch

dengshen

@yanzhiling2001 谢谢。还没试过 dd 这个操作

yanzhiling2001

@dengshen #12 我直接 DD 新系统。肯定还有其他的内部监控手段。不如换个新的。

dengshen

@yanzhiling2001 GitHub 有个针对腾讯云监控的卸载脚步。执行以后面板就看不到 CPU 状态了

yanzhiling2001

@dengshen #10 避免追踪。好多云都有监控。

dengshen

@Skmgo 这样做的意义是什么呢?不太懂

css3

ctrl + r

PMR

Auditd forward remote rsyslog

Skmgo

/etc/profile history 从 1000 改为 0,这是我拿到每个新机器第一件要做的事情。

24bit

export PROMPT_COMMAND='{ msg=$(history 1 | { read x y; echo $y; });echo $(date +"%Y-%m-%d %H:%M:%S") [$(whoami)@$SSH_USER$LOGIN_IP `pwd` ]" $msg" >> /var/log/.history; }'

raaaaaar

记录下来?我在用 zsh 有个历史插件,不知道有没有用

yanzhiling2001

@hei1000 #3 这个不错啊,厉害厉害,解决问题了。直接读取这个文件就可以了,history -c 清空了也能看到

hei1000

什么 shell ? bash 的话有~/.bash_history, fish 的话有~/.local/share/fish/fish_history 啊

Rico

history > history.txt ?

zhoudaiyu

使用 JumpServer 管理服务器(自带录屏和历史命令查询)

↑