OS doesn’t find en_US.UTF-8

test : perl -e exit perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = (unset), LANG = “en_US.UTF-8” are supported and installed on your system. perl: warning: Falling back to the standard locale (“C”).   Paste the following or add to server bash.rc : export LANGUAGE=en_US.UTF-8 export LC_ALL=en_US.UTF-8 export…

Clear Linux Cache

1. Clear PageCache only. # sync; echo 1 > /proc/sys/vm/drop_caches 2. Clear dentries and inodes. # sync; echo 2 > /proc/sys/vm/drop_caches 3. Clear PageCache, dentries and inodes. # sync; echo 3 > /proc/sys/vm/drop_caches nJoy 😉

Ubuntu Clean old kernel images

Be VERY CAREFUL with this.   sudo dpkg -l ‘linux-*’ | sed ‘/^ii/!d;/'”$(uname -r | sed “s/\(.*\)-\([^0-9]\+\)/\1/”)”‘/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d’ | xargs sudo apt-get -y purge 😉 nJoy

Install latest influxdb on Ubuntu

curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add – source /etc/lsb-release echo “deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable” | sudo tee /etc/apt/sources.list.d/influxdb.list sudo apt-get update && sudo apt-get install influxdb sudo service influxdb start nJoy 😉  

PM2 set logs to compress and expire

Referring to the github README.md https://github.com/pm2-hive/pm2-logrotate pm2 install pm2-logrotate@2.6.0 pm2 set pm2-logrotate:compress true pm2 set pm2-logrotate:max_size 10M pm2 set pm2-logrotate:retain 7 pm2 conf { “pm2-logrotate”: { “max_size”: “10M”, “retain”: “7”, “compress”: “true”, “dateFormat”: “YYYY-MM-DD_HH-mm-ss”, “workerInterval”: “30”, “rotateInterval”: “0 0 * * *”, “rotateModule”: true }, “module-db”: { “pm2-logrotate”: { “uid”: null, “gid”: null } }…

Show all cronjobs for all users

This is a simple script to get all cronjbs for all users on a system for someone in $(cut -f1 -d: /etc/passwd); do echo $someone; crontab -u $someone -l ; done nJoy 😉  

incrond cannot exec process: No such file or directory

Inside you incrontabs, you must leave only 1 space between the . If you leave 2 or more spaces, then the 2nd (and more) spaces will be considered part of the or and it will fail… I was leaving 2 spaces between and , and incron did not work and in /var/log/syslog there were these…