vi /etc/named.conf filter-aaaa-on-v4 yes; named-checkconf /etc/named.conf vi /etc/sysconfig/named OPTIONS="-4" systemctl restart named-chroot systemctl status named-chroot
Fedora : CPU Thermal Monitor Hint
yum install -y lm_sensors sensors-detect sensors watch sensors\
linux : /var/crash/ : disk full Hint
du -msh /var/crash/* rm /var/crash/????
mlocate : disk full & disable Hint
ps aux | grep updatedb killall updatedb ls -alh /var/lib/mlocate/ -rw-r----- 1 root slocate 30G mlocate.db.xxxxxx rm -f /var/lib/mlocate/mlocate.db.xxxxxx ll /etc/cron.daily/mlocate mkdir /etc/cron.daily/out mv /etc/cron.daily/mlocate /etc/cron.daily/out
Fedora 3X : resin.service regist Hint : systemctl daemon-reload & chkconfig
# cd # wget https://caucho.com/download/rpm-6.8/4.0.63/x86_64/resin-4.0.63-1.x86_64.rpm # rpm -ivh resin-pro-4.0.63-1.x86_64.rpm # systemctl daemon-reload # systemctl enable resin.service resin.service is not a native service, redirecting to systemd-sysv-install. Executing: /usr/lib/systemd/systemd-sysv-install enable resin Failed to execute /usr/lib/systemd/systemd-sysv-install: # yum install chkconfig -y # systemctl enable resin.service resin.service is not a native service, redirecting to systemd-sysv-install. […]
Linux : split big log file by size or date Hint
split -b 1GB test.log < test.log head -n $(cat test.log | grep -m1 -n "2021-07-11" -a | cut -d: -f1) | tail -n +$(cat test.log | grep -m1 -n "2021-07-10" -a | cut -d: -f1) > test.log.20210710 awk 'NR >= 10 && NR <= 100' test.log >new.log.100
MariaDB 10.5 : shrink ibdata after innodb_file_per_table = ON Hint
systemctl stop mariadb mv /var/lib/mysql/ibdata* /backup/ mv /var/lib/mysql/ib_logfile* /backup/ systemctl start mariadb
rsync relative Hint
rsync -avR --relative --address=192.168.1.42 192.168.1.46::all/test/db/./install/test.txt /backup install/ install/test.txt Result [192.168.1.46] /test/db/./install/test.txt [192.168.1.42] /backup/install/test.txt
Fedora : autossh Hint
yum install autossh -y autossh -M 0 -o ServerAliveInterval=30 -p22 -L 33061:127.0.0.1:3306 -N test@remote.com
Fedora 34 : change runlevel Hint - default.target, multi-user.target, graphical.target
systemctl status default.target # to switch runlevels instantly systemctl isolate graphical.target systemctl isolate multi-user.target ll /etc/systemd/system/default.target #runlevel 3 ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target #runlevel 5 ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target