Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我经常需要获取 tgz 文件,解压缩,然后删除 tgz。如何使用一个简单的命令完成所有三个步骤?
wget http://site/path/file.tgz -O - | tar -zxvf -
您可以使用:
curl <url> | tar xz
或者放入你的 bashrc:
function ctxz { curl $1 | tar xz }
并使用:
ctxz <url>