- Forums
- Linux Systems
- How To Crate Text Files In Linux Shell Command
This Page Contains information about How To Crate Text Files In Linux Shell Command By unix in category Linux Systems with 2 Replies. [2869], Last Updated: Sat May 18, 2024
unix
Sat Aug 26, 2006
2 Comments
4170 Visits
Often you want to create a text file. In my example, i will be creating a simple
index.html file
1. Enter the cat command:
CODE:
cat > index.html
2. Type the following:
CODE:
Hello, I am creating index.html file
3. Now hit Control-D, to exit
4. Enter
CODE:
ls
to list the files in the current directory, you will see
index.html in the list.
5. To display the contents of index.html, send this command:
CODE:
cat index.html
6. you should see something like this:
CODE:
Hello, I am creating index.html file