问题
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