From 9c1f14626f3d4f3c8c8c514995782c976f031906 Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 3 Feb 2023 05:24:27 +0100 Subject: [PATCH] head: split POSIX, BSD and GNU (#9818) --- pages/common/head.md | 14 +------------- pages/linux/head.md | 20 ++++++++++++++++++++ pages/osx/head.md | 20 ++++++++++++++++++++ 3 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 pages/linux/head.md create mode 100644 pages/osx/head.md diff --git a/pages/common/head.md b/pages/common/head.md index 358fcff6a..54a5e45a4 100644 --- a/pages/common/head.md +++ b/pages/common/head.md @@ -5,16 +5,4 @@ - Output the first few lines of a file: -`head --lines {{count}} {{path/to/file}}` - -- Output the first few bytes of a file: - -`head --bytes {{count}} {{path/to/file}}` - -- Output everything but the last few lines of a file: - -`head --lines -{{count}} {{path/to/file}}` - -- Output everything but the last few bytes of a file: - -`head --bytes -{{count}} {{path/to/file}}` +`head -n {{count}} {{path/to/file}}` diff --git a/pages/linux/head.md b/pages/linux/head.md new file mode 100644 index 000000000..358fcff6a --- /dev/null +++ b/pages/linux/head.md @@ -0,0 +1,20 @@ +# head + +> Output the first part of files. +> More information: . + +- Output the first few lines of a file: + +`head --lines {{count}} {{path/to/file}}` + +- Output the first few bytes of a file: + +`head --bytes {{count}} {{path/to/file}}` + +- Output everything but the last few lines of a file: + +`head --lines -{{count}} {{path/to/file}}` + +- Output everything but the last few bytes of a file: + +`head --bytes -{{count}} {{path/to/file}}` diff --git a/pages/osx/head.md b/pages/osx/head.md new file mode 100644 index 000000000..01bef49b1 --- /dev/null +++ b/pages/osx/head.md @@ -0,0 +1,20 @@ +# head + +> Output the first part of files. +> More information: . + +- Output the first few lines of a file: + +`head --lines {{count}} {{path/to/file}}` + +- Output the first few bytes of a file: + +`head --bytes {{count}} {{path/to/file}}` + +- Output everything but the last few lines of a file: + +`head --lines -{{count}} {{path/to/file}}` + +- Output everything but the last few bytes of a file: + +`head --bytes -{{count}} {{path/to/file}}`