在 Windows 命令提示符下管道数据 [英] Piping data on Windows command prompt

查看:21
本文介绍了在 Windows 命令提示符下管道数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要获取一个大型 (~8gb) svn 存储库的备份转储.我目前的方法是使用 svnadmin dump 到文件,然后使用 7-Zip 压缩和拆分文件.

I need to get a backup dump of a large (~8gb) svn repository. My current method involves using svnadmin dump to a file and then using 7-Zip to compress and split the file.

> svnadmin dump c:path	omyrepo > c:svndump.svn
> 7z svndump.svn svndump.7z      // or whatever the correct syntax is

我想知道是否有办法跳过这里的中间人,并通过使用管道或其他方式一次性压缩 svn 转储数据?这可能吗?语法是什么?

I was wondering if there would be a way to skip the middle-man here, and get the svn dump data to be compressed in one go by using pipes or something? Is this possible? What would the syntax be?

推荐答案

svnadmin dump 默认转储到标准输出7z 命令行可以使用 -si 开关从标准输入读取.

svnadmin dump dumps to standard out by default and the 7z command line can read from standard input using the -si switch.

svnadmin dump c:path	omyrepo | 7z a -si svndump.7z

这篇关于在 Windows 命令提示符下管道数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆