cat
cat: concatenate files and print them.
Synopsis
cat [file…]
Description
cat writes the contents of each file to standard output, one after another. With no file, or where a file is -, it reads standard input.
Each read takes what the file has now and writes it at once, so a file that never ends (a sensor’s, /dev/motion0: an event a line) shows each piece as it comes.
A file that cannot be opened or read is reported on standard error, and cat goes on with the next one.
Options
None.
Exit status
0 if every file was read; 1 if any could not be opened or read.
Examples
cat notes.txt
cat head.txt - tail.txt > all.txt
cat /dev/motion0
Notes
GNU cat’s options (-n, -A and the others) are not supported.
See also
head(1), tail(1), less(1)