Bash gunzip错误

Bash gunzip错误,bash,gunzip,Bash,Gunzip,在尝试恢复文件“derp”时,终端打印 DERP0006440001750001750000000000512343302711011660 0ustar用户DERP 而且没有打开文件,我很困惑,有人能帮我吗 # let the user choose what they want to Restore echo -n "Select the file or directory you want to Restore" read chosendata echo -e "Starting R

在尝试恢复文件“derp”时,终端打印 DERP0006440001750001750000000000512343302711011660 0ustar用户DERP 而且没有打开文件,我很困惑,有人能帮我吗

# let the user choose what they want to Restore
echo -n "Select the file or directory you want to Restore" 
read chosendata 

echo -e "Starting Restore"

# unziping files
gunzip -c ${chosendata}
 # end the backup.
echo -e "Restore complete"

“gunzip-c”解压到标准输出,而不是文件。使用“man gunzip”查看gunzip的选项。

好的,我删除了-c,现在我只有一个。tar文件不是.tar.gz如何将我从新代码中获得的文件重定向到tar xvf filename.tar如果原始文件是tar文件,然后被gzip压缩,通常您需要一步完成tar xzvf解压和解压。或者,您可以使用“gunzip-c”解压到stdout,然后通过管道将其传输到tar到untar,然后对结果输出执行任何操作。