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.
我假设这个命令首先创建 tar 文件,然后是 gzip 文件。tar -zcvf 文件.tgz /somefolder
问题是,完整的 .tar 文件是先写在磁盘上的某个地方然后压缩,还是放在 RAM 内存中并从那里压缩?
gzip 和 tar 同时运行,tar 将其输出通过管道传输到 gzip。整个 tar 文件永远不会存在于任何地方,无论是在 RAM 中还是在磁盘上。tar 文件的块在被 gzip 压缩之前暂时存在于 RAM 中,然后将压缩后的输出写入磁盘。