Khi chạy lệnh này:
$ sudo rsync -r --delete --force --checksum --exclude=uploads /data/prep/* /data/app/
Tôi đang nhận được đầu ra sau:
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
Từ việc đọc, man rsyncấn tượng của tôi là --forcetùy chọn sẽ cho rsync xóa những thư mục không trống này, đó là kết quả mong muốn.
Tham chiếu:
--force force deletion of dirs even if not empty
Làm thế nào tôi có thể sửa đổi lệnh để xóa các thư mục không trống?
Tôi đang sử dụng rsync phiên bản 3.0.8, trên phiên bản Gentoo Base System 2.0.3, trong trường hợp có liên quan.
Cập nhật: Đã thêm vào sudolệnh để làm rõ rằng đây không phải là vấn đề về quyền của tệp.
ext3. Có thể hệ thống tập tin có thể cần hoặc sửa chữa. Tôi sẽ có fsckcơ hội tiếp theo và cập nhật với kết quả.
fscklà hệ thống và vấn đề này vẫn còn.