Jür*_*aul 1 linux ssh tar curl pipe
curl -L http://download.transmissionbt.com/files/transmission-2.80.tar.xz -s -o - | tar -xf -
Run Code Online (Sandbox Code Playgroud)
错误:
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
Run Code Online (Sandbox Code Playgroud)
但是,当我这样做时,它可以提取存档:
curl -LO http://download.transmissionbt.com/files/transmission-2.80.tar.xz
tar xf transmission-2.80.tar.xz
Run Code Online (Sandbox Code Playgroud)
为什么管道不起作用?
我认为您的管道中需要tar's-J选项。例如| tar -xJf -
该-J选项告诉tar使用xz压缩。
我认为tar xf transmission-2.80.tar.xz没有工作的原因-J是该选项是tar根据文件扩展名推断出来的。
| 归档时间: |
|
| 查看次数: |
3600 次 |
| 最近记录: |