tar: Cowardly refusing to create an empty archive

我与影子孤独终老i 提交于 2019-12-24 07:00:38

问题


I use the following tar command to try to backup my entire file system

tar -cvpzf test/backup.tar.gz --exclude=/test

And I receive the following error message

tar: Cowardly refusing to create an empty archive
Try 'tar --help' or 'tar --usage' for more information.

Can somebody point me in the right direction as to how to use tar and explain why it's trying to create an empty archive?


回答1:


You defined what to exclude, but didn't define what you actually want in the archive. Supply at least one path. If you want entire filesystem, then tar -c....... /



来源:https://stackoverflow.com/questions/44380154/tar-cowardly-refusing-to-create-an-empty-archive

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!