1 Star 0 Fork 0

dddachui/openeuler-init

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
HIST.sh 488 Bytes
一键复制 编辑 原始数据 按行查看 历史
dddachui 提交于 2023-07-23 16:32 +08:00 . first commit
#!/bin/bash
# Start history set tag
USER_IP=$(echo $SSH_CONNECTION | awk "{print $1}")
if [ "$USER_IP" = "" -o "$USER_IP" = "127.0.0.1" ]; then
USER_IP="localhost"
fi
HISTTIMEFORMAT="%F %T ${USER_IP} ${whoami}"
export HISTTIMEFORMAT
export HISTFILESIZE=3000000
export HISTSIZE=1000
user_ip=`echo $USER_IP | sed "s/\ /-/g" | sed "s/\./_/g"` >> /dev/null
export HISTFILE="/var/log/history/${LOGNAME}-${user_ip}-history"
chmod 644 /var/log/history/*-history 2>/dev/null
# End history set
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/wangdachui2019/openeuler-init.git
git@gitee.com:wangdachui2019/openeuler-init.git
wangdachui2019
openeuler-init
openeuler-init
master

搜索帮助