# Working with Text Files in Bash
This file introduces commands for viewing and manipulating the content of text files.
1. cat: Concatenate and Display Files
- Displays the content of one or more files.
- `cat <filename>`: Shows the content of the specified file.
- `cat file1.txt file2.txt`: Shows the content of both files concatenated.
- Example: `cat README.md`
2. less: View File Content Page by Page
- Allows you to view large files without loading the entire content into memory.
- Use spacebar to go to the next page, 'b' for the previous page, and 'q' to quit.
- `less <filename>`: Opens the file in the less viewer.
- Example: `less large_log_file.txt`
3. head: Display the Beginning of a File
- Shows the first few lines of a file (default is 10).
- `head <filename>`: Shows the first 10 lines.
- `head -n <number> <filename>`: Shows the first specified number of lines.
- Example: `head config.ini`, `head -n 5 data.csv`
4. tail: Display the End of a File
- Shows the last few lines of a file (default is 10). Useful for monitoring logs.
- `tail <filename>`: Shows the last 10 lines.
- `tail -n <number> <filename>`: Shows the last specified number of lines.
- `tail -f <filename>`: Follows the file in real-time, displaying new lines as they are added.
- Example: `tail access.log`, `tail -f error.log`
These commands are essential for inspecting and understanding the contents of text-based
files.