If you want to free space on Backups you can use find to select a special month: find -newerct "1 Sep 2023" ! -newerct "1 DEC 2023" -delete This command removes files created from 01.Sep.2023 to 01.Dec.2023. ..very useful..
Schlagwort: command line
Howto: Create qrcode image command line
If you need digital bookmarks to share as Pic on social media do: Install qrencode : sudo apt-get install qrencode then as user: qrencode -o qrcode.png 'www.linuxonlinehelp.com My Blog' Result:
Script DNS Blocker DNSMASQ
If you tested pihole, you perhaps look for a smaller Command Line version? Install dnsmasq by: sudo apt-get install dnsmasq Here DNS Rule Injector Script (copy & paste): blocker.sh # www.linuxonlinehelp.com 2019 # DNS Blocker for Small Linux with dnsmasq # #!/bin/bash # goto tmp (tmpfs) cd /tmp/ # get URL-Blocklists wget -O blocklist.txt https://v.firebog.net/hosts/Kowabit.txt […]
Apache: Count Visits on Console
If you use a Webserver like Apache, you can use a small script to Analyse your Logs. Create a analyse-web.sh Script with: $sudo nano /home/user/analyse-web.sh insert: #!/bin/bash cat /var/log/apache2/access.log | awk '{ print $1 }' | sort | uniq -c exit 0 System Output: 1573 www.domain2.de 3568 www.domain3.de .. If you change the „$1“ to […]
WordPress: Change Word on all content sites with mysql
If you run a WordPress Blog or other CMS with MySQL Backend you can easy change one same word or expression on all content sites on the fly Do a mysqldump at first of the current database $ mysqldump -u username -p dbname > dbbackup.sql Login to the MySQL server Console Switch to the Database […]
WordPress: Monitor the Size of the MYSQL Database
If you use WordPress or a other Blog Software with a MySQL Database over years it is useful to do some things regularly: Check the Database Size weekly, that no Skript Kid has found a Backdoor and fills up the Database silent Purge Database Caches with default maintenance tools of the Software Dont forget to […]
WordPress: Change User Password manual on mysql prompt
If you don’t want to use Passwords generated by wordpress itself, you can do it manual on a MYSQL Console howto: Login to your Webserver with the Database via encrypted SSH!! Login to the MYSQL Server Conssole with $ mysql -u username -p Enter Password, and change database with mysql>use database-name-of-blog Now Set Password for […]