Home Explore Blog CI



nix

src/nix/nar-cat.md
78c696115eeb5a35543cc85c3587106cb638f5c1662ab3e80000000300000217
R""(

# Examples

* List a file in a [Nix Archive (NAR)][Nix Archive] and pipe it through `gunzip`:

  ```console
  # nix nar cat ./hello.nar /share/man/man1/hello.1.gz | gunzip
  .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.46.4.
  .TH HELLO "1" "November 2014" "hello 2.10" "User Commands"
  …
  ```

# Description

This command prints on standard output the contents of the regular
file *path* inside the NAR file *nar*.

)""

Chunks
dbfb437e (1st chunk of `src/nix/nar-cat.md`)
Title: Description of the `nix nar cat` command
Summary
The `nix nar cat` command extracts and prints the contents of a specified file within a Nix Archive (NAR) to standard output. An example demonstrates how to list a file in a NAR and pipe it through `gunzip`.