Linux Commands
View Linux File Contents with cat.
View Linux File Contents with cat.
There are so many ways to view Linux file contents. One of the simplest is way to view the file contents is using the cat command:
Example:
root@fedora ~]# cat filename.txt
Create file
Using cat command
Fedora Core
Operating
Systems
[root@fedora ~]#
Note: From the example above, the cat command is use with no greater-than (>) sign. The file name that you want to view is issue after the cat command. The text in the file is displayed immediately after you hit the enter key, all the contents of the file display after you hit enter key, the first line after the cat command. The "end of file" content is mark on the appearance of shell prompt.
- Fedoracore's blog
- Add new comment
- 1071 reads
Create Files with cat.
Create Files with cat.
There are so many ways of creating a file in Linux base operating system. One of the simples way to create a file is using the cat command:
Command example:
[root@fedora ~]# cat > filename.txt
Create file
Using cat command
Fedora Core
Operating
Systems
<--- press Ctrl+D to save and exit newly created file
[root@fedora ~]#
- Fedoracore's blog
- Add new comment
- Read more
- 1073 reads

Recent comments
21 hours 33 min ago
1 day 1 min ago
2 days 11 hours ago
3 days 16 hours ago
4 days 19 hours ago
5 days 23 hours ago
6 days 1 hour ago
6 days 14 hours ago
1 week 19 hours ago
2 weeks 6 days ago