aboutsummaryrefslogtreecommitdiff
path: root/src/nix/store-cat.md
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-12-09 20:06:19 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-12-21 13:32:28 +0100
commitc14ed3f8b2cbddb335227d2ff5188896e76b713f (patch)
treeb4f737b93faf65477932c81242762f4f5a04bb0d /src/nix/store-cat.md
parent2cc02bbe7675acb4754b928b5c57fa316600e877 (diff)
Add 'nix store' NAR-related manpages
Diffstat (limited to 'src/nix/store-cat.md')
-rw-r--r--src/nix/store-cat.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/nix/store-cat.md b/src/nix/store-cat.md
new file mode 100644
index 000000000..da2073473
--- /dev/null
+++ b/src/nix/store-cat.md
@@ -0,0 +1,19 @@
+R""(
+
+# Examples
+
+* Show the contents of a file in a binary cache:
+
+ ```console
+ # nix store cat --store https://cache.nixos.org/ \
+ /nix/store/0i2jd68mp5g6h2sa5k9c85rb80sn8hi9-hello-2.10/bin/hello | hexdump -C | head -n1
+ 00000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|
+ ```
+
+# Description
+
+This command prints on standard output the contents of the regular
+file *path* in a Nix store. *path* can be a top-level store path or
+any file inside a store path.
+
+)""