原因选项"f" 表示The archive file name is given on the command line (required whenever the tar output is going to a file),f后边需要跟压缩文件的名字。
所以把tar命令从"tar -cvfz src.tar.gz src"改成"tar -czvf src.tar.gz src"后,就不会遇到那个错误了。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26687597/viewspace-1203778/ ,如需转载,请注明出处,否则将追究法律责任。