- Search for 'figcaption'
- recursive
- ignore spaces
- case insensitive
- only ascii files
- show line numbers
- grep for 'colgroup'
- ignore results with '.css' or '.js'
grep -siRIn 'figcaption' web | grep 'colgroup' | grep -Ev '\.css|\.js'
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
List config vaiables
/usr/sbin/mariadbd --help --verbose | grep "query.*size"
Restart MariaDB / MySQL
Commandline:
MariaDB Restart (after changes in /etc/mysql/db-performance.cnf)
After my changes in /etc/mysql/db-performance.cnf
Error: configure: error: no acceptable C compiler found in $PATH
Error:
PHP 8.3, APCu via PECL
PHP 8.3 extra packages (+ pecl, apcu)
apt update && apt upgrade
https : Secure Connection Failed
I get this error, when I visit https://solr.example.com:8983 :
Remove files and show the number of deleted files
Remove all files starting with 2024 in mydir123 and show the number of deleted files:
find mydir123 -name '2024*' -exec rm -vf {} \; | wc -l
find . -name '*' | xargs rm …
find . -name '*' | xargs rm -v
Maybe Patch
https://www.drupal.org/project/tablefield/issues/3397688
/etc/my.cnf
Edit "/etc/my.cnf" ( under [mysqld] ):
transaction_isolation="READ-COMMITTED"
Restart MariaDB / MySQL: