Finde Dateien die Text NICHT enthalten

find . -type f -exec grep -Li "maintenance" {} \+

Hierbei ist -L fuer alle Dateien die den Text nicht enthalten

L, --files-without-match
              Suppress normal output; instead print the name of each input file from which no  output  would  normally  have  been  printed.   The
              scanning will stop on the first match.

und kleines -l fuer Dateien die den Text enthalten.


-l, --files-with-matches
              Suppress  normal output; instead print the name of each input file from which output would normally have been printed.  The scanning
              will stop on the first match.


Weiterlesen …

Viele SQL Dumps importieren

find . -name '*.sql' | awk '{ print "source",$0 }' | mysql --batch

Weiterlesen …

mit sed Zeilen suchen und vollstaendig ersetzen

sed -i '/pm.max_children =/c\pm.max_children = 100' *.conf
sed -i '/pm.start_servers =/c\pm.start_servers = 32' *.conf
sed -i '/pm.min_spare_servers =/c\pm.min_spare_servers = 16' *.conf
sed -i '/pm.max_spare_servers =/c\pm.max_spare_servers = 32' *.conf

Weiterlesen …