我如何在压缩文本文件中查找文本模式? [英] How can I grep for a text pattern in a zipped text file?
问题描述
Linux上的href =http://linux.about.com/library/cmd/blcmdl1_zgrep.htm =noreferrer> zgrep 。如果您使用的是Windows,则可以下载 GnuWin ,其中包含一个zgrep的Windows端口。
Our daily feed file averages 2 GB in size. These files get archived to a single zip file at the end of each month and stored in a network share. From time to time, I have a need to search for certain records in those files. I do this by connecting by remote desktop to the shared server, unzip the files to a temp folder, run grep (or PowerShell) search, and then delete the temp folder. Now, because our server is running low in disk space, it is no longer recommeded to unzip them all to a temp folder. What is an efficient way to do a regex search on those zipped files with minimum impact on disk or network resources?
zgrep on Linux. If you're on Windows, you can download GnuWin which contains a Windows port of zgrep.
这篇关于我如何在压缩文本文件中查找文本模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!