Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-26-2003, 06:45 PM   #1
Registered: Jan 2003
Distribution: RedHat Linux 9
Posts: 126

Rep: Reputation: 15
Terminal question

I'm wondering if i can edit or create a file with only the terminal.Please answer.
Old 08-26-2003, 06:52 PM   #2
Registered: Mar 2003
Posts: 76

Rep: Reputation: 15
yes. to create a file, use the command touch, ie

touch fakefile

to edit, use a text editor like nano or pico.

nano fakefile

if the file doesn't exist, u can also do nano, then on saving the file will be created.
Old 08-26-2003, 06:52 PM   #3
Registered: May 2003
Location: India
Distribution: Knoppix, RedHat
Posts: 246

Rep: Reputation: 30

ya. of course you can. use a command line editor like vi or emacs. vi is small and fast while emacs is more slow but powerful. if you want to create an empty file

touch filename will create it.

if you dont know to use vi

here is a quick help


press i to go into insert mode and type whatever you want

esc :wq will save and quit the file

in emacs

control x control f will ask for filename. specify a new filename on the bottom. control x control c will quit after asking you whether you want to save the file

hope that helpds

rahul sundaram
Old 08-26-2003, 06:53 PM   #4
Registered: Mar 2003
Posts: 76

Rep: Reputation: 15
oh damn same time........
Old 08-26-2003, 09:08 PM   #5
Senior Member
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Many configuration files require you to be root user before opening on the command line - remember to su to root user first.
Old 08-26-2003, 09:26 PM   #6
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
I'm wondering if i can edit or create a file with only the terminal
Of course. That's how they dunned it before all them pretty pictures wuz on yur computer.
Old 08-26-2003, 11:44 PM   #7
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Technically, a full screen editor like that is just another ui. For the barest bones editor in the world, like DOS' COPY CON

'cat > filename'

Then if you need to fix something, maybe sed. I'd think even 'ed' was cheating as it's got its own line interface.


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
Terminal question Optimistic Slackware 2 08-15-2004 01:39 PM
Terminal Emulators Question ximiansavior Linux - Software 4 11-17-2003 07:07 AM
terminal question gonzalezjay Linux - General 7 10-16-2003 07:05 PM
Terminal question SnowSurfAir Linux - Software 2 08-17-2003 08:22 PM
terminal question DrOzz Linux - General 3 06-22-2003 12:15 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:58 PM.

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
Open Source Consulting | Domain Registration