1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-05 22:45:59 +02:00
tldr/pages/common/cat.md
pixel c70bae523e
cat: split POSIX, BSD and GNU and add 2 examples (#9623)
Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>
2022-12-21 04:18:13 +01:00

24 lines
584 B
Markdown

# cat
> Print and concatenate files.
> More information: <https://www.gnu.org/software/coreutils/cat>.
- Print the contents of a file to the standard output:
`cat {{path/to/file}}`
- Concatenate several files into an output file:
`cat {{path/to/file1 path/to/file2 ...}} > {{path/to/output_file}}`
- Append several files to an output file:
`cat {{path/to/file1 path/to/file2 ...}} >> {{path/to/output_file}}`
- Copy the contents of a file into an output file without buffering:
`cat -u {{/dev/tty12}} > {{/dev/tty13}}`
- Write `stdin` to a file:
`cat - > {{path/to/file}}`