grep + mv files
- Search / Grep content of files in all-documents/
- Move files containing africa to documents-africa/
grep -siRlI 'africa' all-documents/ | xargs mv -t documents-africa/
grep -siRlI 'africa' all-documents/ | xargs mv -t documents-africa/
tar --exclude='./dir2ignore' --exclude='./cache_etc' -zcvf /backup/myarchive.tar.gz .
So geht es:
drush php-eval 'my_custom_module_cron();'
Controller könnte so aussehen:
<?php
class myController extends ControllerBase
{
public function myFunc1()
{
$html = " ... ";
return [
'#type' => 'inline_template',
'#template' => '{{ html|raw }}',
'#context' => ['html' => $html]
];
}
}
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
Code:
find / -name art 2>&1 | grep -v "Permission denied"
*** [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
Problem:
# composer update --dry-run
Loading composer repositories with package information
Updating dependencies (including require-dev)
[RuntimeException]
Could not load package drupal/recaptcha in https://packages.drupal.org/8: [UnexpectedValueException] Could not parse version constraint dev: Invalid version string "dev"
[UnexpectedValueException]
Could not parse version constraint dev: Invalid version string "dev"
Lösung:
composer self-update --rollback
Firefox Developer Tools > Console :
(function($){
$("input[id^=edit-field-image]").val('Amsterdam im Sommer');
})(jQuery);
Als ich das System (Drupal 8.9.3) auf Devel 4.0 updaten wollte, habe ich folgenden Fehler erhalten:
[error] (Currently using Missing or invalid module Array)