Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-18-2004, 02:06 PM   #1
LQ Newbie
Registered: Feb 2004
Location: PA
Posts: 10

Rep: Reputation: 0
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.

Old 02-18-2004, 02:10 PM   #2
LQ Newbie
Registered: Feb 2004
Posts: 28

Rep: Reputation: 15
Open up VI with a filename listed.


vi filename

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


to write the file.

Hit escape a few more times and then type


to quit.

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

Boom biddy boom
Old 02-18-2004, 02:38 PM   #3
Registered: Dec 2003
Location: Denmark
Distribution: Mandrake
Posts: 179

Rep: Reputation: 30
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
Old 02-18-2004, 02:48 PM   #4
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
touch filename


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating the log-file dr_sad Programming 5 04-12-2005 06:01 PM
creating an executable file liljhand Linux - Newbie 5 01-23-2005 11:56 PM
when creating a *.iso file, how to make the file size smaller? minm Linux - Newbie 8 12-26-2004 10:58 PM
Creating A new file rodbuh Programming 3 05-12-2004 09:33 AM
Creating new file link1305 Linux - Newbie 5 11-26-2003 09:59 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration