tar--to-stdout如何还原stdout的内容并将其保存到具有原始目录的文件系统中

时间:2018-08-06 07:43:21

标签: performance tar

当tar从*.tar.gz提取文件时,我不会限制写入速度。 现在,我可以将文件提取到stdout,并使用pv限制速度,但是如何从stdout恢复文件呢? 是否有更好的方法来实现这一目标?

1 个答案:

答案 0 :(得分:0)

使用 lhs op rhs est.std se z pvalue 对tar文件的读取进行速率限制,并将TTB<-c(117,173,159,50.4,99.7,116,202,122,143,105,94.9,70.6,112,252,150,468,240,183,140,140,168,116,178,172,163,150,92.8,74,84.3,144,183,193,222,128,121,137,109,136,78.1,113,92.4,106,99,111,127,90,152,47.7,134,230,115,292,153,209,69.4,155,161,196,186,143,233,255,130,86.9,215,191,182,35.6,150,79.5,113,94.2,46.4,148,101,114,108,102,141,110,116,139,171,153,172,123,159,335,165,259,152,159,142,155,111,236,166,164,157,198,485,296,191,415,294,327,98.7,169,392,256,355,428,458,255,295,321,387,462,271,497,287,257,442,235,506,274,322,163,278,451,148,459,196,323,322,333,436,393,341,406,339,203,226,466,216,296,268,222,384,230,267,309,217,395,348,456,243,381,290,311,285,176,266,355,394,325,214,398,289,139) TTR<-c(9,8,1,1,4,3,2,4,8,13,7,9,8,11,10,6,6,8,1,2,5,3,2,3,2,5,3,4,3,2,2,3,7,2,5,9,6,5,4,5,5,2,3,5,8,5,3,4,10,6,7,9,2,2,7,7,8,8,6,7,14,8,8,6,9,8,7,8,12,8,8,9,6,10,8,9,6,7,14,9,8,8,11,16,11,12,13,11,9,10,11,9,10,11,15,12,13,13,11,9,10,7,11,7,14,11,9,10,10,9,6,6,6,10,14,15,8,11,9,9,10,10,8,9,9,9,8,7,10,10,9,7,9,8,10,8,8,7,11,13,11,9,13,9,8,10,9,6,6,8,5,7,5,6,9,6,7,10,10,12,13,12,8,11,8,8,5,5,5,10) SA<-c(39.8,40.5,44.4,37.6,40.9,41,44.7,45.2,41.6,45.1,34.3,33.8,51.9,56,51.1,51,50.2,51,43.9,59,48.9,44.5,47.2,46.2,38.1,38,42,45.1,41.6,40.9,46.1,41.4,45.5,41.8,41.4,48.4,45.2,39.4,38.8,38.2,41.1,38.3,40,43.6,44.9,41.4,41.2,30.5,46.5,44.2,49.4,49.8,46.2,56.2,44.5,47.9,47.9,45.8,46.6,41.7,41.6,46.1,34.5,33.8,69.3,47.5,45.5,33.6,41.2,28.8,43.5,34.3,33.5,42.1,44.4,38.2,45.7,41.1,43.9,41.6,42.2,35.5,42.2,47.5,NA,52,45.1,46.7,39.9,58.5,35.5,42.4,42.2,49,39.2,51.3,39.3,47.5,43.3,58.1,59.4,60.7,55.5,48.8,53.9,57.7,61.1,67.8,51.6,51.8,53.6,71.3,58,60.8,59.2,64,56,63.1,52.7,67.8,70.9,60.5,55.1,62.3,63.9,66.1,70.5,63.2,54.7,64.5,52.3,58.9,64.7,74.4,65.3,54.2,77.2,66.7,59.8,55.9,64.2,46.5,49,62.7,55.2,49.2,53.8,46.9,59.3,51.7,51,56.6,55,52.8,64.4,59.4,61,61.8,55.4,58.4,68.4,58.8,52.3,51.3,57.4,65.2,58.5,54,55.5,59) SNR<-c(6,5.9,5.4,5.4,4.1,5.5,5.7,5,4.8,5.7,5.6,5.5,4.7,4.9,5.7,5,4.8,3.9,2.4,3.4,3.6,3,2.7,3.7,3.8,3.6,3.1,3.3,3,2.3,2.1,2.8,0.7,0.4,2,6.2,3.6,3.5,3,2.6,2.7,3.3,3.9,2.4,3.2,5.3,3.5,3.2,2.5,2.9,3.2,1.9,2.5,4.1,3.5,3.4,3.8,4.4,3,2.6,3.8,3.2,5.5,4.5,4,3.4,4.4,4.8,5.1,6.5,6.5,4.8,4.8,5,6.3,5.3,8.7,7.4,7.8,7.8,7.6,8.8,8.8,6,5.7,4.1,5,0.9,6.8,6.5,6.1,7.5,6.8,6.6,5,7.3,4.7,5.1,5.1,5.2,5.2,5.2,5.2,6.9,6.9,4.5,4.5,4.8,6.2,6,6.4,6.1,6,6,6.4,6,6.4,5.7,5.7,5.7,7,7.6,7,5.9,7,7,6.1,4.9,5.1,4.9,4.8,4.6,0.8,4,4,4.3,4.3,4.7,4.7,5.9,4.1,4.1,3.8,3.8,4.9,4.9,3.8,3.8,3.6,4.1,4.2,4.2,5.4,4,4,3.9,3.9,4.7,4.7,4.1,4.1,4,4,4.3,5.2,5.2,4.5,3.5,4.6,4.3) GDD<-c(4579,4547,4701,4687,4656,4625,4666,4636,4698,4685,4682,4669,4872,4905,4738,4716,4732,4718,5100,5052,5042,5053,4842,4817,5149,5124,5199,5171,5167,5139,5251,5229,5214,5187,4967,4946,4975,4940,4676,4638,4676,4643,4772,4743,4772,4738,4743,4716,5271,5252,5297,5270,5290,5262,5304,5277,5291,5264,5525,5500,5066,5035,5060,5031,5070,5040,5052,5111,5109,5191,5191,5200,5200,5173,5169,5169,5114,5157,5114,5114,5141,5141,5139,5111,5108,5108,5090,5146,5125,5134,5155,5132,5132,5183,5167,5178,5178,5176,5176,5160,5160,5162,5162,5162,5149,5149,5152,5152,5117,5117,5117,5117,5111,5105,5166,5169,5169,5180,5178,5178,5199,5183,5183,5181,5192,5192,5226,5226,5206,5204,5220,5206,5206,5198,5198,5184,5184,5184,5184,5223,5223,5196,5196,5197,5197,5213,5213,5167,5167,5139,5139,5144,5144,5159,5167,5167,5145,5145,5143,5143,5160,5160,5160,5188,5188,5186,5186,5197,5199,5199) CMI<-c(1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.4,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3) 的输出传输到pv

pv

请注意,指定tar将导致pv -L ... tarfile.tar.gz | tar -xvzf - 从标准输入中读取。

这限制了读取压缩 tar文件的速度。那可能不是您想要的。这将限制未压缩数据馈送到-f -的速度,并且可能更好地限制tar写入磁盘的速率:

tar

请注意,此tar的调用没有zcat tarfile.tar.gz | pv -L ... | tar -xvf - 选项。