Wenn Sie diesen Befehl ausführen:
$ sudo rsync -r --delete --force --checksum --exclude=uploads /data/prep/* /data/app/
Ich erhalte folgende Ausgabe:
cannot delete non-empty directory: html/js/ckeditor/_source/plugins/uicolor/yui
cannot delete non-empty directory: html/js/ckeditor/_source/plugins/uicolor/yui
cannot delete non-empty directory: html/js/ckeditor/_source/plugins/uicolor
cannot delete non-empty directory: html/js/ckeditor/_source/plugins/uicolor
cannot delete non-empty directory: html/js/ckeditor/_source/plugins
cannot delete non-empty directory: html/js/ckeditor/_source/plugins
cannot delete non-empty directory: html/js/ckeditor/_source
cannot delete non-empty directory: html/js/ckeditor/_samples
cannot delete non-empty directory: html/js/ckeditor/plugins/uicolor/yui
cannot delete non-empty directory: html/js/ckeditor/plugins/uicolor/yui
cannot delete non-empty directory: html/js/ckeditor/plugins/uicolor
Aus der Lektüre den man rsynces war mein Eindruck , dass die --forceOption sagt rsync würde dies nicht leere Verzeichnisse zu löschen, was das gewünschte Ergebnis ist.
Ref:
--force force deletion of dirs even if not empty
Wie kann ich den Befehl ändern, um die nicht leeren Verzeichnisse zu löschen?
Ich verwende rsync Version 3.0.8 auf Gentoo Base System Release 2.0.3, falls dies relevant ist.
Update: Dem sudoBefehl hinzugefügt , um zu verdeutlichen, dass es sich nicht um ein Dateiberechtigungsproblem handelt.
ext3. Möglicherweise ist das Dateisystem in Not oder repariert. Ich werde fsckbei nächster Gelegenheit und mit den Ergebnissen aktualisieren.
fsckdas System und dieses Problem ist immer noch vorhanden.