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 ~]#
Note: The greater-than sign (>) after cat command is necessary to create the file. The text typed is written to a file with the specified file name, on the example above the text that you type is written to the text file named filename.txt.
Press Ctrl+D key after a line-break (just hit the enter key after last line of text) to denote the end of the file. The next shell prompt is displayed then use the ls -l command to verify the existence of the new file called filename.txt
- Fedoracore's blog
- Add new comment
- 1070 reads

Recent comments
15 hours 35 min ago
1 day 17 hours ago
2 days 21 hours ago
3 days 35 min ago
3 days 13 hours ago
4 days 18 hours ago
2 weeks 2 days ago
2 weeks 3 days ago
2 weeks 3 days ago
2 weeks 3 days ago