关于tar 命令中 - (stdin/stdout)的巧用 - CSDN博客
2019年6月12日 · tar -cvf - /home | tar -xvf - 前面把压缩结果存到-,后面通过管道 | 把存到-中的文件解压,如果纯粹看这个,觉得这不瞎折腾么,下面实战就发现了 使用 - 的好处了;
Searching…
2019年6月12日 · tar -cvf - /home | tar -xvf - 前面把压缩结果存到-,后面通过管道 | 把存到-中的文件解压,如果纯粹看这个,觉得这不瞎折腾么,下面实战就发现了 使用 - 的好处了;
Linux中最常用的打包程序的就是tar了,使用tar程序打出来的包我们常称为tar包,tar包的文件都是以.tar结尾的。 生成的tar包,就可以使用其他的程序来进行压缩。
语法 Options 参数 实例 基本操作选项 1. -c:创建一个新的归档文件。 2. -x:解压归档文件。 3. -t:列出归档文件的内容。 4. -r:向现有归档文件中追加文件。 5. -u:仅追加比归档文件中已有文件更新的文件。 6. -d:找到归档文件中与文件系统不同步的差异。 7. -A:将一个 .tar 文件追加到另一个 .tar文件中。 文件选择和排除 1. -f :指定归档文件的名称(必须放在选项列表的最后)。 ...
2025年11月11日 · tar cannot read in file data from stdin for creating an archive, since then tar will have no way of knowing what a file is - where one begins or ends, what its path and metadata is. 評論數: 5
2024年5月28日 · Is it possible to use tar to create a archive completely in memory? I mean, you can pipe file names into tar's stdin, which are then used to create the archive. 評論數: 1
2019年1月3日 · I learned recently that using xargs may not be the best way to pull this off because xargs may invoke tar multiple times if the cmdline arg list gets too long, and I was advised to …
2010年4月8日 · The tar program has been implemented in a variety of ways. For example, on IBM's version of Unix, AIX, tar uses the -L option rather than -T, and requires a file rather than …
2018年11月22日 · 当从stdin读取时,tar无法知道内容的大小,除非它读取所有内容,在这种情况下,需要将它们存储在某个地方,以便将这些内容存储在tarball本身中。
2024年5月28日 · In this tech support article, we will explain how to use standard input (stdin) with tar.gz files in various operating systems. We will cover the use of create archive command with …