Replace barlin and burlin with berlin in db_2021.sql:
sed -i -E "s/([a-z0-9_\-]+)\.(barlin|burlin)/\1.berlin/g" db_2021.sql
Replace barlin and burlin with berlin in db_2021.sql:
sed -i -E "s/([a-z0-9_\-]+)\.(barlin|burlin)/\1.berlin/g" db_2021.sql
Trim all array elements with PHP:
$trimmed_array = array_map('trim', $fruits);
To see the difference:
WGET do:
wget -U 'Mozilla/MyUserAgent' -P /root/t3mp/wget --wait=3 --random-wait -nd -r -l 2 -e robots=off https://example.com
Mysql export kann sehr lange dauert, wenn man viele und große Datenbanken hat. Damit man schnell ein Backup von allen DBs erstellen kann:
mysqldump --opt --quick --all-databases > /root/backup/mysql/alldbs.sql
Wenn User login notwendig ist :
mysqldump -u root -p --opt --quick --all-databases > /root/backup/mysql/alldbs.sql
while :
do
date
echo "Hello "
sleep 5
done
while : ; do date; echo "Hello "; sleep 6; done
Search for BERLIN in a very big file
cat very-big-bigfile.txt | grep -o -P '.{0,33}BERLIN.{0,44}'
1 * * * * wget -O /dev/null -o /dev/null my-example-website.com
grep -siRlI 'africa' all-documents/ | xargs mv -t documents-africa/
tar --exclude='./dir2ignore' --exclude='./cache_etc' -zcvf /backup/myarchive.tar.gz .
Neueste Kommentare
/etc/my.cnf
Edit "/etc/my.cnf" ( under [mysqld] ):
transaction_isolation="READ-COMMITTED"
Restart MariaDB / MySQL:
Create Sub-Directories with WGET
wget -U 'Mozilla/MyUserAgent' -P MyTempDir123 --wait=0.2 --random-wait -nd -r -x -l 4 -e robots=off --reject
Ignore Binaries, JS, CSS etc
wget -U 'Mozilla/MyUserAgent2024' -P MyOutPutDirectory --wait=1 --random-wait -nd -r -l 2 -e robots=off --reject
Intel(R) Xeon(R) E-2288G CPU @ 3.70GHz
# sysbench --threads="$(nproc)" cpu run
AMD Ryzen 7 PRO 3700 8-Core Processor
# sysbench --threads="$(nproc)" cpu run
Reload .bashrc without logging out
Diese Lösung wird empfohlen aber hat bei mir nicht funktioniert.
Welche Alternative gibt es?
Composer + PHP 8.3
ln -snf /opt/plesk/php/8.3/bin/php /etc/alternatives/php
composer.json
In composer.json, update:
Empty Flood Table
drush sqlq "DELETE FROM flood"
Gmail Apps (SMTP Login):…
Gmail Apps (SMTP Login):
https://security.google.com/settings/security/apppasswords