Commands.app

cat

Text Processing

Concatenate and display file contents

Options & Flags
Available options for this command
-n

Number all output lines

-b

Number non-empty output lines

-A

Show all characters including non-printable

Examples
Common usage examples

Display contents of file.txt

cat file.txt

Display contents of multiple files

cat file1.txt file2.txt

Display file with line numbers

cat -n script.sh
Notes
  • For large files, consider using 'less' or 'more' instead
  • Can be used to create files: cat > newfile.txt
Related Commands
You might also find these useful