LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-26-2003, 07:52 PM   #1
link1305
Member
 
Registered: Oct 2003
Location: Cleveland, Ohio
Distribution: Gentoo
Posts: 53

Rep: Reputation: 15
Creating new file


I've searched around a bit, but found nothing about this. How would I go about creating a new text file in linux? Easy in windows, but nowhere to be seen in linux.

Actually I want a .cfg file for my Call of Duty server, but if I create a .txt file then just change the extension, it should work, right?

Thanks
 
Old 11-26-2003, 07:58 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
The "normal" approach would be to open
a text editor, start typing, and then to save
it as the file you want it to be :}


Cheers,
Tink
 
Old 11-26-2003, 08:15 PM   #3
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
If your starting a file you can give it any extension you want when you save it.

If your using GNOME or KDE just open a text editor from the main menu. Then save your file with the .cfg extension (Just like notepad). If the command line then
vi filename.cfg
i
to enter text
ESC :wq
to save and quit
 
Old 11-26-2003, 08:36 PM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
If you wanna do it bass-ackwards, you could 'touch foo.cfg' and then turn around and 'editor foo.cfg' but I think Tinkster's and darthtux's method is more economical.
 
Old 11-26-2003, 08:51 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
:D

Nice one digi ..

touch my.cfg
and then tackle the rest with sed ;)


Cheers,
Tink
 
Old 11-26-2003, 08:59 PM   #6
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
You never see sed in the 'favorite editors' polls but it's a great tool.

Oh, and also, link1305, you can 'cat > foo.cfg' and type for awhile and ctrl-d. That goes great with sed, too.
 
  


Reply



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 05:01 PM
creating an executable file liljhand Linux - Newbie 5 01-23-2005 10:56 PM
when creating a *.iso file, how to make the file size smaller? minm Linux - Newbie 8 12-26-2004 09:58 PM
Creating A new file rodbuh Programming 3 05-12-2004 08:33 AM
Creating a File Melissa22 Linux - Newbie 3 02-18-2004 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:40 PM.

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