If you want to see content of a file in Terminal make use of the cat command,
Syntax: cat [file...]
Example:$ cat myfile.txt
This is my text file.
This file has multiple lines.
You can also use this command to concatenate and display content of multiple files as well,
Example:$ cat myfile.txt myfile1.txt
This is my text file.
This file has multiple lines.
This is file 2
✌️Note that when you cat multiple files at a time the content are displayed as read-only and no files are written!
If you file is not at the current location, you can also provide absolute path as well,
$ cat /Users/c2c/Desktop/myfile.txt
This is my text file.
This file has multiple lines.
Display content of a huge file with more and less option

If you want to display the content of a file that has many lines, the whole content of the file is printed on the screen and many not be able to see all the data as the scroll will be enabled and you will end up at the bottom of the screen, in such case you can make you of more or less command,
Example:$ cat myfile.txt | more
This is my text file.
This file has multiple lines.
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
:
You can press spacebar to get more data displayed in screen (next batch) or q to quit and come back to the prompt.
- Terminal display next month Calendar
- How to change bash terminal prompt string and color
- How to exit from nano command
- How to Display content of a file in Terminal Screen?
- Copy entire directory using Terminal Command [Linux, Mac, Bash]
- 3 Commands to stop Nginx Server
- How to check file permissions for your file using Linux/Unix/macOS Terminal Command
- Create Hidden File or Directory using Shell Command
- bash: cls: command not found
- How to install python pip on Ubuntu using apt command
- The Date Command and its usage [Linux - Unix - macOS]
- SCP Copy all files from directory to Local Folder
- Create and write file in single Linux/macOS command
- Install OpenSSL on Linux/Ubuntu
- scp: ssh: connect to host xxxx port 22: Connection refused Error
- Check SSH/OpenSSH version Command
- Execute .bin and .run file Ubuntu Linux
- What does apt-get update command does?
- How to ls command to output one entry per line [macOS/Linux/Bash]
- 3 ways to clear screen on Linux Terminal
- How to backup a file in Linux/Unix
- How to quit or exit SFTP Prompt on Terminal
- How to use SCP Command to Copy Directory
- zsh hello world example
- How to remove/delete a directory in Linux/macOs
- Command to display epoch time Terminal - Linux
- SharePoint 2010 DataForm Unable to display this Web Part System.StackOverflowException - SharePoint
- 'Edit Document' Requires a Windows Sharepoint Services-compatible application and Microsoft Internet Explorer 6.0 or higher - SharePoint
- zsh: command not found: nvm [brew macOS] - MacOS
- How to know installed version of Homebrew - MacOS
- Notepad++ Reload - This file has been modified by another program. Do you want to reload it? - NotepadPlusPlus
- How to add to PATH in macOS Big Sur - MacOS
- Add Text at Start and End of Each Line Notepad++ - NotepadPlusPlus