Home Explore Blog CI



nix

1st chunk of `src/nix/nar-ls.md`
2795a40561c7aa4e1039affc97ed1ddb4190c06a1f6fa182000000010000022d
R""(

# Examples

* To list a specific file in a [NAR][Nix Archive]:

  ```console
  # nix nar ls --long ./hello.nar /bin/hello
  -r-xr-xr-x                38184 hello
  ```

* To recursively list the contents of a directory inside a NAR, in JSON
  format:

  ```console
  # nix nar ls --json --recursive ./hello.nar /bin
  {"type":"directory","entries":{"hello":{"type":"regular","size":38184,"executable":true,"narOffset":400}}}
  ```

# Description

This command shows information about a *path* inside [Nix Archive (NAR)][Nix Archive] file *nar*.


)""

Title: Nix Nar Ls: Examples and Description
Summary
This section provides examples of using the `nix nar ls` command to list files and directories within a Nix Archive (NAR) file. It also describes the command's purpose, which is to show information about a path inside a NAR file.