- 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/
Damit man alle dateien verschieben kann, erst dieses Befehl ausführen (oder in /root/.bashrc speichern, damit es permanent funktioniert)
shopt -s dotglob
Wenn man Inhalt von Ordner_B(Ziel) mit Inhalt von Ordner_A(Quelle) überschreiben möchte:
rsync -a Quelle_mit_Ordner_und_Dateien/ Ziel_Ordner/
Szenario:
Mehrere Personen laden tausende Dateien wie Bilder-Videos usw per FTP hoch. Eine Überschreibungsgefahr existiert. Wir wollen Dateien die komplett hochgeladen sind, verschieben. In diesem Fall, Dateien, die in der letzten 11 Minuten geändert wurden, werden als offene Dateien behandelt und nicht verschoben. Rest wird verschoben.
* * * * * /usr/bin/find /home/meinFTPOrdner1 -mmin +11 -exec /bin/mv -v {} /home/meinFTPOrdner2/ \; >> /logs/output-von-mv.txt
ich versuche mit einer Kombination von find + mv alle .tar.gz Datein zu einen neuen ordner kopieren aber es geht leider nicht. Ich bekomme folgende Fehlermeldung:
find: paths must precede expression: mv
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
Shell Code ist:
# find ./ -name '*tar.gz' mv -v {} "meine-ordner/" \;
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: