运行此命令时:
$ sudo rsync -r --delete --force --checksum --exclude=uploads /data/prep/* /data/app/
我得到以下输出:
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
通过阅读,man rsync
我的印象是该--force
选项将告诉rsync删除这些非空目录,这是理想的结果。
参考:
--force force deletion of dirs even if not empty
如何修改命令以删除非空目录?
如果相关,我正在Gentoo基本系统版本2.0.3上使用rsync版本3.0.8。
更新:已添加sudo
到命令中,以明确表明这不是文件权限问题。
ext3
。文件系统可能需要或需要修复。我将fsck
抓住下一个机会,并提供最新结果。
fsck
系统,这个问题仍然存在。