Linux Shell Loop : For (5x), While (endless) - One Line / Multiline

Submitted by Gast (nicht überprüft) on Di, 11/24/2020 - 02:38

While (endless, stop: CTRL+C)

while : 
 do 
  date
  echo "Hello "
  sleep 5
 done

Alternativ:

while : ; do date; echo "Hello "; sleep 6; done

 

For (5x):

for i in {1..5}
do
   echo "Number is $i "
   sleep 2
done

 Alternativ 1:

for i in {1..5}; do echo "Number is $i "; sleep 2; done

 

 Alternativ 2:

for i in {1..5}; do echo "Number is $i " && sleep 2; done

 

 

mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces

Submitted by Gast (nicht überprüft) on Sa, 10/03/2020 - 19:53

Command 1:

drush sql:dump  | gzip -c > /home/backup/db-$(date +%Y-%m-%d-%H%M).sql.gz

Error:

mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces

Lösung:

drush sql:dump --extra-dump=--no-tablespaces

 

 

Solr Error : Your open file limit is currently 1024. It should be set to 65000 to avoid operational disruption

Submitted by Gast (nicht überprüft) on Mi, 09/23/2020 - 18:12

*** [WARN] *** Your open file limit is currently 1024. It should be set to 65000 to avoid operational disruption.

If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh