cat & less
Reading Files: cat & less
cat prints entire file contents to the terminal. It's great for small files. For larger files, use less which lets you scroll through page by page.bash
# Print file contents
cat hello.txt
# Print with line numbers
cat -n hello.txt
# Concatenate multiple files
cat file1.txt file2.txt
# View a long file (scroll with arrow keys, q to quit)
less /var/log/syslogTip:cat stands for 'concatenate' — it was originally designed to join files together, not just display them!
Terminalbash
Welcome to the Linux Terminal Simulator!
Type commands below. Use 'help' to see available commands.
Try: