LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Creating a File (https://www.linuxquestions.org/questions/linux-newbie-8/creating-a-file-147654/)

Melissa22 02-18-2004 01:06 PM

Creating a File
 
So this may sound stupid, I'm taking a networking class, and we are working with Linux Red Hat 7.3 I have created directories, but I have no clue how to create a file. In fact I can't seem to find it in the lab book I have. I am supposed to save a file to a floppy (which I know how to do) but how do I create the file? I am definately a newbie.

Thanks to anyone who answers.

Melissa

deadjoebob 02-18-2004 01:10 PM

Open up VI with a filename listed.

eg:

vi filename

Once in VI, hit escape a bunch of times, then type

:w

to write the file.

Hit escape a few more times and then type

:q!

to quit.

ls to see your new empty file called "filename".

Boom biddy boom

lone_nut 02-18-2004 01:38 PM

or use:
echo > filename
wich launces the program echo (this is a simple program that always prints its arguments.) and direct output to file filename.

Welcome to the free world

hanzerik 02-18-2004 01:48 PM

touch filename


All times are GMT -5. The time now is 04:45 AM.