1. Intro If you have an old kernel that you are not using, you should delete it. Because it fill up the /boot capacity. 2. How to do? 2.1. check kernel # current kernel uname -a # list kernel sudo dpkg –list | grep linux-image 2.2. Delete old kernel sudo apt purge linux-image-[version] […]
Author: manager
qmail retry time
1. qmail retry time qmail-send delivery retry tims (remote) 2. Result Retry after 400 seconds retry after previous delay time + 800 seconds, … 1-hour : 3 times 4-hour : 6 times 12-hour : 10 times 24-hour : 14 times 3. Proof cat /var/log/maillog Q. How to identify if it is the same […]
modify telnetlib buffer
1. Intro If you want to change the socket buffer size of Telnetlib 2. How to do? sed -i “s/self.sock.recv(50)/self.sock.recv(250)/” /usr/lib/python3.6/telnetlib.py
Delete domain 1st section
1. Intro Delete domain 1st section 2. regular expression ^[a-zA-Z0-9_-]+ ^\.
Compare Directory
1. Intro If you want to compare all files in directory A and directory B 2. Command diff -ru dir_A dir_B
Check Sendmail version
1. Intro Show Sendmail version 2. Command sendmail -d0.1 < /dev/null | grep -i version
Fail crond
1. Intro If cron does not run with the following error 2. Cause Account password expired. 3. Solution Modify Account’s password max days 3.1. Check default Policy grep “PASS_MAX_DAYS” /etc/login.defs 3.2. Change account Policy chage -E -1 -M 99999 [username] grep “[username]” /etc/shadow
split file
1. Intro split a file into pieces 2. Command 2.1. split by byte split -b [10m / 10k] [file name] 2.2. split by line split -l [line number] [file name]
check python ssl version
1. Intro check python cryptography, ssl version 2. command 2.1. cryptography python import cryptography cryptography.__version__ quit() 2.2. ssl python import ssl ssl.OPENSSL_VERSION quit()
Set date
1. Intro Set date, time 2. Command 2.1. sync NTP : rdate rdate -s time.nist.gov 2.2. manually set date : date date -s “2020-01-31 19:10:00”