skip to main |
skip to sidebar
In the earlier post we have seen how to create empty file(s) using the touch command. Now lets check how can we create files using the cat command. Just type the command cat > test and then hit the return key and you would find the cursor waiting in the next line for you to type the content that you want to store in the file test. Type what ever you want and then press Ctrl d (In unix Ctrl d represents the end of file (EOF)). The cat command recognizes the EOF character and then saves the content to the file test.
cat command had another feature. It has the ability to display the contents of the file as well. simply type the command cat test at the shell prompt and then hit the return key and you will find the output on you terminal screen.

From the Picture we created file using cat command
and then displayed the contents of the file using the same command.
© 3 column Minima Template by Bloganol
0 comments:
Post a Comment