August 12, 2020
Python
使用python SSL SMTP 发送邮件以163 SSL SMTP服务为例:163开通SMTP服务和获取授权码
import smtplib
from email.mime.text import MIMEText
from email.utils import formataddr
i ...
查看更多
August 8, 2020
Linux
centos6centos6使用cron和tmpwatch来清理tmp目录:没有的需要手动安装:yum install tmpwatch.x86_64,安装成功会产生一个/etc/cron.daily/tmpwatch文件,用于定时清理/tmp目录,内容如下:
#! /bin/sh ...
查看更多
July 15, 2020
Linux
参考文章 http://www.361way.com/securecrt-password-ini/6345.html
这里只是转载了脚本和写了一下使用方法,文章没有强调要重新安装模块pip3 install pycryptodome,不安装该模块也可以正常执行,但是会报错,提示Erro ...
查看更多
July 8, 2020
私钥生成公钥ssh-keygen -y -f id_rsa > id_rsa.pub.tobecompared
然后对比一下id_rsa.pub.tobecompared和id_rsa.pub
查看指纹ssh-keygen -lf id_rsa
查看更多
June 29, 2020
Linux
locale查看当前系统语言locale -a查看系统支持的语言,可以通过grep过滤想要的语言如:中文:locale -a | grep zh_ 一般用zh_CN.UTF-8英文:locale -a | grep en_ 一般用en_US.utf8
# centos7
vim /etc/ ...
查看更多
June 29, 2020
Linux
bash自动补全脚本目录:/etc/bash_completion.d
# bash completion for menu.py
# 命令补全
_test_options()
{
local curr_arg;
curr_arg=${COMP_WORDS[CO ...
查看更多
June 22, 2020
Linux
iostat是I/O statistics(输入/输出统计)的缩写,iostat工具将对系统的磁盘操作活动进行监视。它的特点是汇报磁盘活动统计情况,同时也会汇报出CPU使用情况。iostat也有一个弱点,就是它不能对某个进程进行深入分析,仅对系统的整体情况进行分析本文参 ...
查看更多
June 11, 2020
# Centos7
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/cent ...
查看更多
June 11, 2020
# Centos7
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/cent ...
查看更多
June 1, 2020
Python
官方文档
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020-6-1 11:28
# @Author : FreezeJ
# @File : get_machine_info.py
# @Software: ...
查看更多