How to see the contents of a file without using a text editor [duplicate]
This question already has an answer here:
How do I open a text file in my terminal?
16 answers
I'm wondering how to read the contents of a file, for instance, I have a text file containing the words hello world and I want to read this file without using a text editor. What can I do?
files
marked as duplicate by pomsky, karel, Zanna, Sergiy Kolodyazhnyy, Fabby Nov 30 at 9:58
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How do I open a text file in my terminal?
16 answers
I'm wondering how to read the contents of a file, for instance, I have a text file containing the words hello world and I want to read this file without using a text editor. What can I do?
files
marked as duplicate by pomsky, karel, Zanna, Sergiy Kolodyazhnyy, Fabby Nov 30 at 9:58
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How do I open a text file in my terminal?
16 answers
I'm wondering how to read the contents of a file, for instance, I have a text file containing the words hello world and I want to read this file without using a text editor. What can I do?
files
This question already has an answer here:
How do I open a text file in my terminal?
16 answers
I'm wondering how to read the contents of a file, for instance, I have a text file containing the words hello world and I want to read this file without using a text editor. What can I do?
This question already has an answer here:
How do I open a text file in my terminal?
16 answers
files
files
edited Nov 30 at 8:55
Zanna
50k13131238
50k13131238
asked Nov 29 at 20:05
Scorch
7210
7210
marked as duplicate by pomsky, karel, Zanna, Sergiy Kolodyazhnyy, Fabby Nov 30 at 9:58
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by pomsky, karel, Zanna, Sergiy Kolodyazhnyy, Fabby Nov 30 at 9:58
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
There are number of commands which you can use to read the file in terminal without using a text editor. My favorites are "less" & "more". You can also use cat as suggested by Scorch.
Uses:
more <file_name>
less <file_name>
cat <file_name>
You can also check man pages for more details.
add a comment |
I use the command cat for this.. Ok so here are the contents of hello.txt:
Hello World
Now you open terminal and cd into the directory in which hello.txt is located and type cat hello.txt and the output will (or should) be: Hello World.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
There are number of commands which you can use to read the file in terminal without using a text editor. My favorites are "less" & "more". You can also use cat as suggested by Scorch.
Uses:
more <file_name>
less <file_name>
cat <file_name>
You can also check man pages for more details.
add a comment |
There are number of commands which you can use to read the file in terminal without using a text editor. My favorites are "less" & "more". You can also use cat as suggested by Scorch.
Uses:
more <file_name>
less <file_name>
cat <file_name>
You can also check man pages for more details.
add a comment |
There are number of commands which you can use to read the file in terminal without using a text editor. My favorites are "less" & "more". You can also use cat as suggested by Scorch.
Uses:
more <file_name>
less <file_name>
cat <file_name>
You can also check man pages for more details.
There are number of commands which you can use to read the file in terminal without using a text editor. My favorites are "less" & "more". You can also use cat as suggested by Scorch.
Uses:
more <file_name>
less <file_name>
cat <file_name>
You can also check man pages for more details.
answered Nov 29 at 20:36
Puneet Dixit
3603517
3603517
add a comment |
add a comment |
I use the command cat for this.. Ok so here are the contents of hello.txt:
Hello World
Now you open terminal and cd into the directory in which hello.txt is located and type cat hello.txt and the output will (or should) be: Hello World.
add a comment |
I use the command cat for this.. Ok so here are the contents of hello.txt:
Hello World
Now you open terminal and cd into the directory in which hello.txt is located and type cat hello.txt and the output will (or should) be: Hello World.
add a comment |
I use the command cat for this.. Ok so here are the contents of hello.txt:
Hello World
Now you open terminal and cd into the directory in which hello.txt is located and type cat hello.txt and the output will (or should) be: Hello World.
I use the command cat for this.. Ok so here are the contents of hello.txt:
Hello World
Now you open terminal and cd into the directory in which hello.txt is located and type cat hello.txt and the output will (or should) be: Hello World.
answered Nov 29 at 20:05
Scorch
7210
7210
add a comment |
add a comment |