fdisk -l /dev/sda | grep -E sda[0-9]+ | sed s/*// | awk '{printf ("%s %f ",$1,$2/512); if($2%512){ print "BAD" }else {print "Good"} }' | column -t
Monthly Archives: October 2015
journalctl follow
sudo journalctl --follow
mdadm stop resync
echo “idle” > /sys/block/md1/md/sync_action
docker exec -it bash cannot start a shell session
If you using selinux, you can reinstall some rules:
sudo dnf reinstall docker-selinux
linux leave only one space
… | sed ‘s/ */ /g’
linux skip first line
cat something | tail -n +2
awk sum disk usage size
du -sm * | awk '{ total = total + $1 } END { print total }'
playbook run on one host
ansible-playbook my-playbook.yml -i inventory_file --extra-vars "target=hostname" --check
vi my-playbook.yml
---
- hosts: '{{ target }}'
remote_user: root
tasks:
- name: Install http on remote server
yum: pkg=httpd state=latest
linux df in gb
df -BG
postfix view email content in queue
mailq | grep “search something” or postqueue -p
postcat -q MESSAGE_ID
directadmin domain pointer blacklist
cp -v /usr/local/directadmin/data/templates/forbidden_domains.list /usr/local/directadmin/data/templates/custom/forbidden_domains.list
vi /usr/local/directadmin/data/templates/custom/forbidden_domains.list
directadmin list user domains
cat /usr/local/directadmin/data/users/*/domains.list
force installatron update
wget http://dal01.installatron.com/installatron-plugin.sh
chmod +x installatron-plugin.sh
./installatron-plugin.sh -f
error installatron is temporarily disabled
This error usually means problem with installatron license and you should update it.
awk sum output
ps aux | grep qemu| awk ‘{ sum+=$19 } END { print sum}’