BBS水木清华站∶精华区
发信人: reden (鱼 ~ 君子律己以利人), 信区: Linux
标 题: Un-tar as you download
发信站: BBS 水木清华站 (Mon Oct 5 00:04:15 1998) WWW-POST
Un-tar as you download
Date: Wed, 19 Aug 1998 13:08:52 -0500
From: scgmille@indiana.edu
It's time for fun with pipes. Recently, when downloading the latest kernel
over a ridiculously slow connection, I wanted to see
where the download was by checking which file in the tarball was being
received. After pondering the pipes and GNU utils, this
thought came to mind.
You can decompress and un-tar your files as they download, sort of a
"streaming decompressor", if you will. From the command
line:
tail -f --bytes=1m file-being-downloaded.tar.gz | tar -zxv
Tail will display downloaded portion of the file, then remain open displaying
bytes as they come. Make sure the 1m (1 megabyte in
this case) is LARGER than what you have already downloaded. The piped output
of tail goes to tar and the rest is history.
Similarly, for bz2 files:
tail -f --bytes=1m file.tar.bz2 | bunzip2 - | tar -xv
Enjoy!
--
白马带著她一步步的回到中原。白马已经老了,只能慢慢的走,
但终是能回到中原的。江南有杨柳、桃花,有燕子、金鱼……
汉人中有的是英俊勇武的少年,倜傥潇洒的少年……但这个美
丽的姑娘就像古高昌国人那样固执:
「那都是很好很好的,可是我偏不喜欢。」
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 202.99.18.67]
BBS水木清华站∶精华区