How To Crate Text Files In Linux Shell Command

RegisterLogin
How To Crate Text Files In Linux Shell Command
Post Description: How To Crate Text Files In Linux Shell Command
Tags: How, To, Crate, Text, Files, In, Linux, Shell, Command
This Post Was Posted On Feb 29, 2008 By unix #2087
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
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
©2011 Webune Forums - Mon Dec 19, 2011 12:59 pm
Powered by: Webune Forums V3