{"id":129298,"date":"2025-06-04T11:07:56","date_gmt":"2025-06-04T02:07:56","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=129298"},"modified":"2025-06-04T11:07:56","modified_gmt":"2025-06-04T02:07:56","slug":"windows-ripgrep-z","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/windows-ripgrep-z\/","title":{"rendered":"Windows\u7248\u306eripgrep\u3067\u5727\u7e2e\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2025\/06\/s_20250604_104029.jpg\" alt=\"\" width=\"1091\" height=\"602\" class=\"aligncenter size-full wp-image-129299\" \/><\/p>\n<p>\u300c<a href=\"https:\/\/github.com\/BurntSushi\/ripgrep\">ripgrep<\/a>\u300d\u306f\u30c6\u30ad\u30b9\u30c8\u3092\u9ad8\u901f\u306b\u691c\u7d22\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30c4\u30fc\u30eb\u3067\u3001macOS\/Linux\/Windows\u306a\u3069\u3055\u307e\u3056\u307e\u306a\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u52d5\u4f5c\u3057\u307e\u3059\u3002<\/p>\n<p>ripgrep(rg)\u306f\u3001\u5358\u306b\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3060\u3051\u3067\u306a\u304f\u300c<strong>-z(--search-zip)<\/strong>\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u5727\u7e2e\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u306e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u4f55\u6545\u304bWindows\u3067\u306f\u671f\u5f85\u901a\u308a\u306b\u52d5\u4f5c\u3057\u307e\u305b\u3093\u3067\u3057\u305f(macOS\u3067\u306f\u554f\u984c\u306a\u304f\u52d5\u4f5c\u3057\u3066\u3044\u307e\u3057\u305f)<\/p>\n<p>\u4ee5\u4e0b\u3001Windows\u7248\u306eripgrep\u3067\u5727\u7e2e\u30d5\u30a1\u30a4\u30eb(\u4eca\u56de\u306f.gz\u30d5\u30a1\u30a4\u30eb)\u3092\u691c\u7d22\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>Windows\u7248ripgrep\u3067\u5727\u7e2e\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22<\/h2>\n<p>\u7d50\u8ad6\u304b\u3089\u66f8\u304f\u3068\u3001<strong>ripgrep\u3067\u5727\u7e2e\u30d5\u30a1\u30a4\u30eb\u691c\u7d22(-z)\u3092\u6709\u52b9\u306b\u3059\u308b\u306b\u306f\u3001\u89e3\u51cd\u306e\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u304c\u5225\u9014\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059<\/strong>\u3002<\/p>\n<p>\u4f8b\u3048\u3070.gz\u30d5\u30a1\u30a4\u30eb\u3092\u89e3\u51cd\u3059\u308b\u305f\u3081\u306b\u306f\u3001gzip\u30b3\u30de\u30f3\u30c9\u304c\u5fc5\u8981\u306b\u306a\u308b\u306e\u3067\u3059\u304c\u3001Windows\u306b\u306f\u5b58\u5728\u305b\u305a\u3001rg\u306e-z\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u52d5\u4f5c\u3057\u306a\u304b\u3063\u305f\u6a21\u69d8\u3002Windows\u7248\u306egzip\u30b3\u30de\u30f3\u30c9\u3092\u81ea\u5206\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308c\u3070\u554f\u984c\u304c\u89e3\u6c7a\u3057\u307e\u3059\u3002<\/p>\n<p>\u3092\u4ee5\u4e0b\u306eURL\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001PATH\u3092\u901a\u3057\u305f\u30d5\u30a9\u30eb\u30c0\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/gnuwin32.sourceforge.net\/packages\/gzip.htm\">Gzip for Windows<\/a><\/li>\n<\/ul>\n<p>\u4eca\u56de\u306f\u5358\u4f53\u306e\u300cBinaries\u300d\u3092\u9078\u3073\u3001\u4e2d\u306b\u542b\u307e\u308c\u3066\u3044\u308bgzip.exe\u3092PATH\u304c\u901a\u3063\u305f\u30d5\u30a9\u30eb\u30c0\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067gzip\u304c\u5b9f\u884c\u3067\u304d\u308b\u306e\u3092\u78ba\u8a8d\u3057\u305f\u5f8c\u3001\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre>\r\nrg -z \u672d\u5e4c utf_ken_all.csv.gz\r\n<\/pre>\n<p>\u5b9f\u884c\u5f8c\u3001\u691c\u7d22\u7d50\u679c\u304c\u6b63\u5e38\u306b\u8868\u793a\u3055\u308c\u308c\u3070\u6210\u529f\u3067\u3059\u3002\u5931\u6557\u306e\u5834\u5408\u306f\u4f55\u3082\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u306f\u306a\u304f\u30d5\u30a9\u30eb\u30c0\u3092\u6307\u5b9a\u3059\u308c\u3070\u3001\u305d\u306e\u4e2d\u306b\u542b\u307e\u308c\u308b.gz\u30d5\u30a1\u30a4\u30eb\u3082\u691c\u7d22\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<h2>\u5b9f\u306f\u30de\u30cb\u30e5\u30a2\u30eb\u306b\u3057\u3063\u304b\u308a\u66f8\u304b\u308c\u3066\u3044\u305f<\/h2>\n<p>\u5b9f\u306f-z\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u4ed5\u69d8\u306frg\u306eman\u30da\u30fc\u30b8\u306b\u3057\u3063\u304b\u308a\u66f8\u304b\u308c\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<pre>\r\n<strong>-z, --search-zip<\/strong>\r\nThis flag instructs ripgrep to search in compressed files. Currently gzip, bzip2, xz,\u3000LZ4, LZMA, Brotli and Zstd files are supported. This option expects the decompression\u3000binaries (such as gzip) to be available in your PATH. If the required binaries are not found, then ripgrep will not emit an error messages by default. Use the --debug flag to see more information.\r\n\r\nNote that this flag does not make ripgrep search archive formats as directory trees. It only makes ripgrep detect compressed files and then decompress them before searching their contents as it would any other file.\r\n\r\nThis overrides the --pre flag.\r\n\r\nThis flag can be disabled with --no-search-zip.\r\n\r\n\r\n\u3053\u306e\u30d5\u30e9\u30b0\u306f\u3001ripgrep \u306b\u5727\u7e2e\u30d5\u30a1\u30a4\u30eb\u5185\u3082\u691c\u7d22\u3055\u305b\u308b\u3088\u3046\u6307\u793a\u3057\u307e\u3059\u3002\u73fe\u5728\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u306e\u306f\u3001gzip\u3001bzip2\u3001xz\u3001LZ4\u3001LZMA\u3001Brotli\u3001\u304a\u3088\u3073 Zstd \u306e\u5404\u5f62\u5f0f\u3067\u3059\u3002\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001\u5bfe\u5fdc\u3059\u308b\u89e3\u51cd\u7528\u30d0\u30a4\u30ca\u30ea\uff08\u4f8b\uff1agzip\uff09\u304c PATH \u306b\u542b\u307e\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u5fc5\u8981\u306a\u30d0\u30a4\u30ca\u30ea\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u5834\u5408\u3067\u3082\u3001ripgrep \u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u3057\u307e\u305b\u3093\u3002\u8a73\u7d30\u60c5\u5831\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f --debug \u30d5\u30e9\u30b0\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\n\r\n\u306a\u304a\u3001\u3053\u306e\u30d5\u30e9\u30b0\u306f\u3001ripgrep \u306b\u30a2\u30fc\u30ab\u30a4\u30d6\u5f62\u5f0f\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30c4\u30ea\u30fc\u3068\u3057\u3066\u691c\u7d22\u3055\u305b\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002ripgrep \u306f\u5727\u7e2e\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u51fa\u3057\u3001\u305d\u308c\u3092\u89e3\u51cd\u3057\u3066\u304b\u3089\u901a\u5e38\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u540c\u69d8\u306b\u305d\u306e\u5185\u5bb9\u3092\u691c\u7d22\u3057\u307e\u3059\u3002\r\n\r\n\u3053\u306e\u30d5\u30e9\u30b0\u306f --pre \u30d5\u30e9\u30b0\u3092\u4e0a\u66f8\u304d\u3057\u307e\u3059\u3002\r\n\r\n\u3053\u306e\u6a5f\u80fd\u306f --no-search-zip \u30d5\u30e9\u30b0\u3067\u7121\u52b9\u306b\u3067\u304d\u307e\u3059\u3002\r\n<\/pre>\n<p>-z\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u306e\u306f\u3001<strong>gzip\u3001bzip2\u3001xz\u3001LZ4\u3001LZMA\u3001Brotli\u3001Zstd\u5f62\u5f0f<\/strong>\u3067\u3001\u4f7f\u7528\u3059\u308b\u306b\u306f<strong>\u5bfe\u5fdc\u3059\u308b\u89e3\u51cd\u7528\u30d0\u30a4\u30ca\u30ea\u304cPATH\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308b<\/strong>\u3068\u306e\u3053\u3068\u3002<\/p>\n<p>\u5fc5\u8981\u306a\u30d0\u30a4\u30ca\u30ea\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u5834\u5408\u3001ripgrep \u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u3057\u306a\u3044\u3082\u306e\u306e\u3001--debug\u30d5\u30e9\u30b0\u3067\u8a73\u7d30\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>\r\nC:\\temp>rg -z --debug utf_ken_all.zip\r\nrg: DEBUG|rg::flags::parse|crates\/core\\flags\\parse.rs:97: no extra arguments found from configuration file\r\nrg: DEBUG|rg::flags::hiargs|crates\/core\\flags\\hiargs.rs:1083: number of paths given to search: 0\r\nrg: DEBUG|rg::flags::hiargs|crates\/core\\flags\\hiargs.rs:1108: using heuristics to determine whether to read from stdin or search .\/ (is_readable_stdin=false, stdin_consumed=false, mode=Search(Standard))\r\nrg: DEBUG|rg::flags::hiargs|crates\/core\\flags\\hiargs.rs:1118: heuristic chose to search .\/\r\nrg: DEBUG|rg::flags::hiargs|crates\/core\\flags\\hiargs.rs:1269: found hostname for hyperlink configuration: buff\r\nrg: DEBUG|rg::flags::hiargs|crates\/core\\flags\\hiargs.rs:1279: hyperlink format: \"\"\r\nrg: DEBUG|rg::flags::hiargs|crates\/core\\flags\\hiargs.rs:174: using 12 thread(s)\r\nrg: DEBUG|grep_cli::decompress|crates\\cli\\src\\decompress.rs:502: bzip2: could not find executable in PATH\r\nrg: DEBUG|grep_cli::decompress|crates\\cli\\src\\decompress.rs:502: bzip2: could not find executable in PATH\r\nrg: DEBUG|grep_cli::decompress|crates\\cli\\src\\decompress.rs:502: xz: could not find executable in PATH\r\nrg: DEBUG|grep_cli::decompress|crates\\cli\\src\\decompress.rs:502: xz: could not find executable in PATH\r\nrg: DEBUG|grep_cli::decompress|crates\\cli\\src\\decompress.rs:502: lz4: could not find executable in PATH\r\nrg: DEBUG|grep_cli::decompress|crates\\cli\\src\\decompress.rs:502: xz: could not find executable in PATH\r\nrg: DEBUG|grep_cli::decompress|crates\\cli\\src\\decompress.rs:502: brotli: could not find executable in PATH\r\nrg: DEBUG|grep_cli::decompress|crates\\cli\\src\\decompress.rs:502: zstd: could not find executable in PATH\r\nrg: DEBUG|grep_cli::decompress|crates\\cli\\src\\decompress.rs:502: zstd: could not find executable in PATH\r\nrg: DEBUG|grep_cli::decompress|crates\\cli\\src\\decompress.rs:502: uncompress: could not find executable in PATH\r\nrg: DEBUG|globset|crates\\globset\\src\\lib.rs:453: built glob set; 0 literals, 0 basenames, 2 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 0 regexes\r\nrg: DEBUG|grep_printer::standard|D:\\a\\ripgrep\\ripgrep\\crates\\printer\\src\\standard.rs:892: ignoring utf_ken_all.zip: found binary data at offset 5\r\n<\/pre>\n<p>\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u5834\u5408\u3001\u3053\u306e\u65b9\u6cd5\u3067\u539f\u56e0\u3092\u8abf\u67fb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Windows\u7248\u306eripgrep\u3067\u5727\u7e2e\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3057\u305f\u3002macOS\u3084Linux\u306e\u5834\u5408\u3001\u89e3\u51cd\u30b3\u30de\u30f3\u30c9\u304c\u6a19\u6e96\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u4e8b\u304c\u591a\u304f\u3001\u4f55\u3082\u3057\u306a\u304f\u3066\u3082-z\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u4f7f\u7528\u3067\u304d\u308b\u3053\u3068\u304c\u591a\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u5927\u3057\u3066Windows\u306e\u5834\u5408\u306f\u81ea\u529b\u3067\u89e3\u51cd\u30b3\u30de\u30f3\u30c9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u305d\u3046\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u300cripgrep\u300d\u306f\u30c6\u30ad\u30b9\u30c8\u3092\u9ad8\u901f\u306b\u691c\u7d22\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30c4\u30fc\u30eb\u3067\u3001macOS\/Linux\/Windows\u306a\u3069\u3055\u307e\u3056\u307e\u306a\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u52d5\u4f5c\u3057\u307e\u3059\u3002 ripgrep(rg)\u306f\u3001\u5358\u306b\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3060 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":129299,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[2047],"tags":[3298],"class_list":["post-129298","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips","tag-windows"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/129298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=129298"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/129298\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/129299"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=129298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=129298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=129298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}