Install pcregrep:
apt install pcregrep
Find all ASCII Files and show output (incl. 100 chars before/after):
pcregrep -rMoI '(.|\n){0,100}MyCustomString:(.|\n){0,100}' web/
Install pcregrep:
apt install pcregrep
Find all ASCII Files and show output (incl. 100 chars before/after):
pcregrep -rMoI '(.|\n){0,100}MyCustomString:(.|\n){0,100}' web/
grep -siRIn 'figcaption' web | grep 'colgroup' | grep -Ev '\.css|\.js'
Combine Find and Grep to find "max_execution_time = 60" in all *.ini files (for PHP config).
Example:
find / -type f -name "*.ini" -exec grep -H 'max_execution_time = 60' {} \;-F, --fixed-strings PATTERNS are strings
grep -F '(text|string|no-regex|no-special-char)\n' ...
grep for february OR april OR july recursively
grep -siRl -E "february|april|july" /path/to/directories/123/
Search for BERLIN in a very big file
cat very-big-bigfile.txt | grep -o -P '.{0,33}BERLIN.{0,44}'
grep -siRlI 'africa' all-documents/ | xargs mv -t documents-africa/
Code:
find / -name art 2>&1 | grep -v "Permission denied"
Man will öfter Fehlermeldungen nicht sehen. Deswegen grep negative ist wichtig
Ein Beispiel wäre:
grep -v "can not access to ..."
Hey Leute, ich möchte auf der Console mit grep nach einer Zeichenkette suchen. Das Problem ist, dass die Ausgabe viel zu lang ist und ich nur von jedem Treffer die ersten 100 Zeichen ausgeben möchte. Wie kann ich es realisieren?
Neueste Kommentare
Wildcard
Let’s Encrypt will only accept a wildcard via DNS challenge.
If your Plesk instance can’t create the _acme-challenge.example.com TXT (external DNS), the extension can’t complete validation and will show no success.
Same problem
Warning: Undefined array key "url" in Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup()set-timezone Europe/Berlin
sudo timedatectl set-timezone Europe/BerlinTry this:1. Go to Tools &…
Try this:
Alternative (without warnings like "no crontab for user")
Alternative (without warnings like "no crontab for dovecot") to see all tasks:
php 8.3 apcu
php 8.3 apcu failed
über Plesk hat es geklappt.
phpize failed error?
install:
# sudo apt install php-devphpize
# sudo apt install…
phpize
# sudo apt install php-devdetails
Problem:
/opt/plesk/php/8.3…
Problem:
Problem:PHP APCu caching…
Problem: